File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change 1
1
birthdays = {'Alice' : 'Apr 1' , 'Bob' : 'Dec 12' , 'Carol' : 'Mar 4' }
2
2
while True :
3
+
3
4
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.' )
You can’t perform that action at this time.
0 commit comments