Write a program that does the following in Python Code:
last_name = ["Smith", "Jones", "Williams", "Bailey", "Rogers", "Pyle", "Rossington"]
first_name =["Lisa", "Bill", "Jay", "Sally", "Walter","Jake","Gary"]
phone_number =["240-233-1921", "301-394-2745", "571-321-8934", "703-238-3432", "703-947-9987", "301-945-3593", "240-671-3221"]
def combine_lists(last_names, first_names, phone_numbers): contacts = {} for i in range(len(last_names)): contacts[last_names[i]] = [first_names[i], phone_numbers[i]] return contacts def main(): last_name = ["Smith", "Jones", "Williams", "Bailey", "Rogers", "Pyle", "Rossington"] first_name = ["Lisa", "Bill", "Jay", "Sally", "Walter", "Jake", "Gary"] phone_number = ["240-233-1921", "301-394-2745", "571-321-8934", "703-238-3432", "703-947-9987", "301-945-3593", "240-671-3221"] contacts = combine_lists(last_name, first_name, phone_number) for last_name, data in contacts.items(): print(data[0] + " " + last_name + ", Number: " + data[1]) last = input("\nEnter a last name: ") if last in contacts: print("Phone number of " + contacts[last][0] + ' ' + last + " is " + contacts[last][1]) main()
Write a program that does the following in Python Code: Stores the following three lists: last_name...
Write a program that does the following in Python Code: Stores the following three lists: last_name = ["Smith", "Jones", "Williams", "Bailey", "Rogers", "Pyle", "Rossington"] first_name =["Lisa", "Bill", "Jay", "Sally", "Walter","Jake","Gary"] phone_number =["240-233-1921", "301-394-2745", "571-321-8934", "703-238-3432", "703-947-9987", "301-945-3593", "240-671-3221"] Has a function named combine_lists() that takes in last_names, first_names and phone_numbers as lists and returns a dictionary called phone_book that uses last_name as the key and a list consisting offirst_name and phone_number. Has a main function that iterates through the phone_book...