Created
May 28, 2017 11:46
-
-
Save odanga94/caf1498966fc2d0048b8da9bd7c90cbb to your computer and use it in GitHub Desktop.
PracticePython/Exercise33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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