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 namenumberPrint 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
Mickey
Tweety
Daffy
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
