Commit c29e5f6e by likorn

Upload lab3

parent 1586b7f8
Showing with 21 additions and 0 deletions
import datetime
today = datetime.date.today()
print("Enter your birth date ")
year = int(input("year: "))
month = int(input("month: "))
day = int(input("day: "))
b_day = datetime.date(year, month, day)
next_b_day = datetime.date(today.year+1, b_day.month, b_day.day)
age = today.year - b_day.year
print("You're "+str(age)+" years old")
if (b_day.month == today.month) and (b_day.day == today.day):
print("Happy b-day!")
else:
days_left = next_b_day - today
print("There're "+str(days_left)+" left")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment