Skip to content

Commit

Permalink
bring back main.py and bday_message.py files
Browse files Browse the repository at this point in the history
  • Loading branch information
Dusch4593 committed Aug 9, 2023
1 parent 00968bf commit 78cc461
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
15 changes: 2 additions & 13 deletions 8-modules/41_countdown.py → 8-modules/41_bday_messages.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Countdown 🎂
# Codédex

import random, datetime
import random

bday_messages = [
'Hope you have a very Happy Birthday! 🎈',
Expand All @@ -11,15 +11,4 @@
'Another year of you going around the sun! 🌞'
]

random_message = random.choice(bday_messages)

today = datetime.date.today()

my_next_birthday = datetime.date(2023, 4, 5)

days_away = my_next_birthday - today

if my_next_birthday == today:
print(bday_messages.random_message)
else:
print(f'My next birthday is {days_away.days} days away!')
random_message = random.choice(bday_messages)
15 changes: 15 additions & 0 deletions 8-modules/41_main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Countdown 🎂
# Codédex

import datetime, bday_messages

today = datetime.date.today()

my_next_birthday = datetime.date(2023, 4, 5)

days_away = my_next_birthday - today

if my_next_birthday == today:
print(bday_messages.random_message)
else:
print(f'My next birthday is {days_away.days} days away!')

0 comments on commit 78cc461

Please sign in to comment.