Site icon Matistics

Python – program to read your NAME and AGE and to display the year in which you will turn 100

name=input("Enter your name\n") 
age=int(input("Enter your age\n"))
present_yr = int(input("Enter the present year"))
birth_yr = present_yr-age 
reach100 = birth_yr + 100 
print(f"Name: {name}") 
print(f"age: {age}") 
print(f"You will turn 100 in {reach100}.")
Exit mobile version