In: Computer Science
In Python 3. Design, implement, and test a network application that maintains an online phonebook. The data model for the phonebook is saved in a file on the server’s computer. Clients should be able to look up a person’s phone number or add a name and number to the phonebook. The server should handle multiple clients without delays.
def harsh_menu():
print('1. Print avaliable Phone Numbers')
print('2. Add a number and Name into a Phone Book')
print('3. Lookup a Phone Number From a PhoneBook')
print('4. Exit')
print()
Add_numbers = {}
Choose_menu = 0
harsh_menu()
while Choose_menu != 4:
Choose_menu = int(input("Type a number b/w (1-5): "))
if menu_choice == 1:
print("Mobile Numbers:")
for x in Add_numbers.keys():
print("Name: ", x, "\tNumber:", Add_numbers[x])
print()
elif Choose_menu == 2:
print("Add Name and Number inTo a phone Book")
name = input("Name: ")
phone = input("Number: ")
Add_numbers[name] = phone
elif Choose_menu == 4:
print("Lookup a Number From a PhoneBook")
name = input("Name: ")
if name in Add_numbers:
print("The number is", Add_numbers[name])
else:
print(name, "was not found")
elif menu_choice != 4:
harsh_menu()
*****************NOTE*******************
if you like the answer please give positive rating that will directly affect our payskill