Question: Need help with this problem, I keep getting stuck and might be starting it wrong. In Python 2 , Write a program that manages the
Need help with this problem, I keep getting stuck and might be starting it wrong.
In Python 2, Write a program that manages the email address of our contacts. Your program must contain a class named contact that has 3 attributes (instance variables): last name, first name, and email. Your class should also have a method to return the name and email address for printing when requested.
Each contact should use a single instance of your contact class. You should use either a list or a dictionary to act as a container of the contact instances.
The program should have a menu that allows the user to interact with your collection of contacts: displaying contacts or adding new contacts as long as the user wishes, then saying goodbye when finished. The menu should offer these options.
Program Options. 1.) Display all contacts 2.) Create new contact 3.) Exit option = raw_input("Enter 1, 2, or 3: ")
Save and retrieve the dictionary or list of instances to/from disk using the pickle module.
Example Output:

Program Options 1.) Display all contacts 2.) Create new contact 3. Save and exit Enter 1, 2, or 3: 1 Name smith, sue Dean, hugh green, am Email ssmith@wer.com hrdeangabc.com sgreen@rty.com Program Options 1.) Display all contacts 2.) Create new contact 3. Save and exit Enter 1, 2, or 3: 2 Enter contact's first name: mac Enter contact's last name davis Enter contact email: mdavis@asd.corm Program Options 1.) Display all contacts 2.) Create new contact 3. Save and exit Enter 1, 2, or 3: 1 Name smith, sue Dean, hugh green, am davis, mac Email ssmith@wer.com hrdeangabc.com sgreen@rty.com mdavis Casd.com Program Options 1.) Display all contacts 2.) Create new contact 3. Save and exit Enter 1, 2, or 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
