Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- year = int(input ("enter birth year:"))
- x = int(input ("enter birth month:"))
- y = int(input("current month:"))
- age = 2020- year
- if x<= y:
- mn=y-x
- elif x > y:
- mn = 12- (x-y)
- age -= 1
- print ("you are " + str(age) + " years, " + str(mn) + " months old")
Add Comment
Please, Sign In to add comment