Question: Write a Python program that: - Asks the user for the name of a dictionary file that contains names and phone numbers and reads in

Write a Python program that:-Asks the user for the name of a dictionary file that contains names and phone numbers and reads in the file contentsinto a dictionary. The file will have a line for each name/number.-Print a menu of options for the user:Lookup: Lookup by name. Asks the user for a name and finds the phone of that person if exists. If the name is not in thephone book, it should print a meaningful message.View: View all. Prints the contents of the phone book.Names: Prints all the names onlyNumbers: Prints all the phone numbers onlyChange: Changes the phone number. Asks the user for a name and a phone number. Changes the phone number of theperson. If the name does not exist, prints a meaningful message.Delete: Deletes a user. Asks the user for a name and deletes the phone entry associated with that name. If the namedoes not exist, prints a meaningful message.
.Sample File:Popeye 111-2222
Mickey 333-6666
Tweety 444-9999
Daffy 999-1111

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!