# Created by Daniel Gau
# Created on 5/29/2012
# 6/9/25 - Added comments to illustrate the logic for each if branch

#current year that doesnt change within this program
CURYEAR = 2025

#gets input from user on thier birthday.
#int() converts the input to string.
month = int(input('Enter the month of your birthday: '))
day = int(input('Enter the day of your birthday: '))
year = int(input('Enter the year of your birthday: '))

#gets input from user on the current day.
#int() converts the input to string.
curmonth = int(input('Enter today\'s month: '))
curday = int(input('Enter today\'s day: '))


#calculates age based on whether the user's birthday
#has already happened this year.

# My birthday month already passed so this is my age.
if curmonth > month:
    age = CURYEAR - year

# This is the month my birthday is.
elif curmonth == month:

    # This means the day is now or has passed.
    if curday >= day:
        age = CURYEAR - year

    # Still waiting for my birthday, it's close!
    else:
        age = CURYEAR - year - 1

# Month before my birthday.
else:
    age = CURYEAR - year - 1

# Print out user's age.
print("you are ",age," years old.")




