Write a Python program that creates a dictionary of son-father pairs-you can make the pairs with fictional names for fun. Your program should populate this dictionary with the son-father pairs
you made up.
Your program should present the user a menu with two options. The following is an example:
Father Finder
0 - Quit
1 - Find a Father
A user input of 0 should end the program. A user input of 1 should cause the program to prompt
the user for the name of a son. If the dictionary contains the son-father pair, the program should
display the father. Otherwise, the program should tell the user it does not know.
My program code below, I got this, entering 0 works, but entering a run just repeats the enter a number choice option, anyone help me out to make it enter a name when entering 1?
-----------------------------------------------------------------------------------------
pairs = {"Jeremy": "Jerome",
"Jason": "Fred",
"Joe" : "Fred",
"Alayna" : "Tom",
"Jay" : "Jerome",
"April" : "Tom"}
choice = Nonewhile choice != "0":
choice = raw_input(
"Please Enter a Number Choice: ")# Finish
if choice == "0":
print "I guess you are done."
# get a definition
elif choice == "1":
choice = raw_input("Please enter a Name: ")print "\n This is your current list \n\n", pairs
else:print "\nI can't do that!", pair, "doesn't exist in the dictionary."
print\
"""Father Finder
0 - Quit1 - Find a Father
"""