Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions birthdays.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@

birthdays={'abhay':'april 3','tanuj':'may 2'}

n=0
while True:
print('Enter the name ______ or dont enter anything for exit')
name=input()
if name==' ':
if n == 0:
cmd =""
else:
cmd = input("Enter exit for Exit else continue")
if cmd == "exit":
break
if name in birthdays:
print(birthdays[name]+' '+'is the birthday of '+name)
else:
print('i dont have birthday details of'+name)
print('What is their birthday?')
bday=input()
birthdays[name]=bday
print('birthday database updated')
name = input("Enter the name")
if name == None:
break
elif name in birthdays.keys():
print(birthdays[name] + ' ' + 'is the birthday of ' + name)
else:
print('i dont have birthday details of' + name)
print('What is their birthday?')
bday = input()
birthdays[name] = bday
print('birthday database updated')
n+=1