We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fc0e6ca commit fced060Copy full SHA for fced060
birthdays.py
@@ -1,14 +1,15 @@
1
birthdays = {'Alice': 'Apr 1', 'Bob': 'Dec 12', 'Carol': 'Mar 4'}
2
while True:
3
+
4
print('Enter a name: (blank to quit)')
-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.')
+ name = input()
+ if name == '':
+ break
+ if name in birthdays:
+ print(birthdays[name] + ' is the birthday of ' + name)
+ else:
+ print('I do not have birthday information for ' + name)
+ print('What is their birthday?')
+ bday = input()
+ birthdays[name] = bday
15
+ print('Birthday database updated.')
0 commit comments