From fc0e6ca2ba8c37c0b831ea6fa25bd3bd3e9871fd Mon Sep 17 00:00:00 2001 From: Vardhaman <83634399+cyai@users.noreply.github.com> Date: Sun, 26 Jun 2022 11:17:21 +0530 Subject: [PATCH] Update and rename birthdays to birthdays.py --- birthdays => birthdays.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) rename birthdays => birthdays.py (58%) diff --git a/birthdays b/birthdays.py similarity index 58% rename from birthdays rename to birthdays.py index 7045265ee57..9d53159a46b 100644 --- a/birthdays +++ b/birthdays.py @@ -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.')