summaryrefslogtreecommitdiff
path: root/misc/birthdays.py
diff options
context:
space:
mode:
Diffstat (limited to 'misc/birthdays.py')
-rw-r--r--misc/birthdays.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/misc/birthdays.py b/misc/birthdays.py
new file mode 100644
index 0000000..8528933
--- /dev/null
+++ b/misc/birthdays.py
@@ -0,0 +1,20 @@
+#!Python
+
+#Birthday
+
+birthdays = {'Alice': 'Apr 1', 'Bob': 'Dec 12', 'Carol': 'Mar 4'}
+
+while True:
+ print('Enter a name (blank to quit):')
+ 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
+ print('Birthday database updated!')