Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python program. Need it quick please. A smart phone has the ability to save contact information. In this assignment, you will simulate the contact list

Python program. Need it quick please.

A smart phone has the ability to save contact information. In this assignment, you will simulate the contact list for a very simple smart phone. Download lab8.py, rename it according to the instructions above, and make sure you understand it. Take the program above and modify it by adding the missing Contact class such that when the program is run, it produces this output.

#lab8.py

# ----------------------------------------------------- # CSCI 127, Lab 8 # October 24, 2017 # Your Name # ----------------------------------------------------- # ----------------------------------------------------- # Do not change anything below this line # ----------------------------------------------------- def print_directory(contacts): print("My Contacts") print("-----------") for person in contacts: print(person) print("----------- ") # ----------------------------------------------------- def main(): champ = Contact("???", "Bobcat", "406-994-0000") president = Contact("Waded", "Cruzado", "406-994-CATS") professor = Contact("John", "Paxton", "406-994-4780") contacts = [champ, president, professor] print_directory(contacts) champ.set_first_name("Champ") president.set_title("President") professor.set_title("Professor") print_directory(contacts) print("The area code for cell number", champ.get_cell_number(), "is", \ champ.get_area_code()) # ----------------------------------------------------- main() 

Ouput

My Contacts ----------- ??? Bobcat 406-994-0000 Waded Cruzado 406-994-CATS John Paxton 406-994-4780 ----------- My Contacts ----------- Champ Bobcat 406-994-0000 President Waded Cruzado 406-994-CATS Professor John Paxton 406-994-4780 ----------- The area code for cell number 406-994-0000 is 406 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

Discuss the techniques of sales forecasting.

Answered: 1 week ago

Question

Write short notes on Marketing mix.

Answered: 1 week ago