Question: 5. Write a telephone lookup program. Read a data set of names and telephone numbers from a file that contains the numbers in random order.

5. Write a telephone lookup program. Read a data set of names and telephone numbers from a file that contains the numbers in random order. Handle lookups by name and also reverse lookups by phone number. Use a binary search for both lookups. Use the following data set:5 pts

Bob|555-1234

Joe|555-2345

John|555-3456

Luke|555-4567

Mark|555-5678

Matthew|555-6789

The program should prompt the user as follows:

L)ookup Name, Lookup N)umber or Q)uit?

Enter the name:

Or

Enter the Number:

a) Your code with comments

b) A screenshot of the execution

Test Cases:

Enter the name: John

Phone number is 555-3456

Enter the Number: 555-4567

Name is Luke

i want you to use Python to solve this Q and make sure do not give old answers caz all the answers i saw it and it was not corrcet or in other saftower and please make sure to include the comments w the coding and screenshot of the output after run it thank you.

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 Databases Questions!