# Arup Guha
# 6/1/2026
# Alternate Solution to Age Problem
# A bit shorter than the previous solution.

#current year that doesnt change within this program
CURYEAR = 2026

#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:'))

# Initial guess.
age = CURYEAR-year

# Guess is wrong if birthday hasn't happened yet, check both conditions.
if curmonth < month or (curmonth == month and curday < day):

    age = age - 1

    '''
    age -= 1 does work in Python but
    age-- does not.
    '''

print("You are",age,"years old.")
