-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename birthdays to birthdays.py
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
birthdays = {'Alice': 'Apr 1', 'Bob': 'Dec 12', 'Carol': 'Mar 4'} | ||
while True: | ||
print('Enter a name: (blank to quit)') | ||
name = input() | ||
if name == '': | ||
name = input() | ||
if name == '': | ||
break | ||
if name in birthdays: | ||
if name in birthdays: | ||
print(birthdays[name] + ' is the birthday of ' + name) | ||
else: | ||
else: | ||
print('I do not have birthday information for ' + name) | ||
print('What is their birthday?') | ||
bday = input() | ||
birthdays[name] = bday | ||
print('Birthday database updated.') | ||
print('What is their birthday?') | ||
bday = input() | ||
birthdays[name] = bday | ||
print('Birthday database updated.') |