Implement a python program in file named tarvel.py. Create an empty dictionary named responses. Implement while loop to take in user's name and desired destination for as long as there are user inputs. Prompt user to input yes to continue and no to quit. Prompt for user's name. Receive the name into the program and save it as the value of name variable. Prompt user for their desired vacation destination. Receive response and save it as the value of a response variable. Send the name and response to your response dictionary as key-value pair. Once all inputs are in the program, print each poll participant's name and desired vacation destination. Use for loop to run through all key-pairs in the dictionary. Pay attention to your output. Print the dictionary to show the key-value pairs. Test program with 3 - 5 key value pairs.o
responses = dict() choice = "yes" while(choice=="yes"): name = input("Enter name: ") destination = input("Enter vacation destination: ") responses[name] = destination choice = input("Input yes to continue and no to quit: ") print("Name\t\tVacation destination") for x in responses.keys(): print(x+"\t\t"+responses[x])
Get Answers For Free
Most questions answered within 1 hours.