Skip to content

Instantly share code, notes, and snippets.

@odanga94
Created May 28, 2017 11:46
Show Gist options
  • Save odanga94/caf1498966fc2d0048b8da9bd7c90cbb to your computer and use it in GitHub Desktop.
Save odanga94/caf1498966fc2d0048b8da9bd7c90cbb to your computer and use it in GitHub Desktop.
PracticePython/Exercise33
def birthday_lookup():
birthdays = {"Albert Einstein": "14/03/1879", \
"Benjamin Franklin": "17/01/1706", "Ada Lovelace": "10/12/1815"}
print("Welcome to the birthday dictionary. We know the birthdays of: \
\nAlbert Einstein\nBenjamin Franklin\nAda Lovelace")
look_up = raw_input("Who's birthday do you want to look up? ")
print("%s's birthday is %s.") %(look_up, birthdays.get(look_up, "there is no such person in our dictionary"))
check_birthday = "y"
while check_birthday == "y":
birthday_lookup()
check_birthday = raw_input("continue('y' or 'n')? ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment