Skip to content

Commit fced060

Browse files
authored
Update birthdays.py
1 parent fc0e6ca commit fced060

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

birthdays.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
birthdays = {'Alice': 'Apr 1', 'Bob': 'Dec 12', 'Carol': 'Mar 4'}
22
while True:
3+
34
print('Enter a name: (blank to quit)')
4-
name = input()
5-
if name == '':
6-
break
7-
if name in birthdays:
8-
print(birthdays[name] + ' is the birthday of ' + name)
9-
else:
10-
print('I do not have birthday information for ' + name)
11-
print('What is their birthday?')
12-
bday = input()
13-
birthdays[name] = bday
14-
print('Birthday database updated.')
5+
name = input()
6+
if name == '':
7+
break
8+
if name in birthdays:
9+
print(birthdays[name] + ' is the birthday of ' + name)
10+
else:
11+
print('I do not have birthday information for ' + name)
12+
print('What is their birthday?')
13+
bday = input()
14+
birthdays[name] = bday
15+
print('Birthday database updated.')

0 commit comments

Comments
 (0)