Write a program that asks the user to enter one's name and age Print out a message addressed to the

preview_player
Показать описание
Q. Write a program that asks the user to enter one's name and age. Print out a message addressed to the user that tells the user the year in which he/she will turn 100 years old.

Website Link :-

Answer:-

name = input ("Enter the Name:- ")
age = int (input("Enter the Age:- "))
# Let present year is 2022
user_age = (100 - age) + 2022
print ("The user will in year ", user_age ,"he/she will turn 100 years old.")

Output :-

Enter the Name:- Path Walla
Enter the Age:- 21
The user will in year 2101 he/she will turn 100 years old.

Enter the Name:- Portal Express
Enter the Age:- 45
The user will in year 2077 he/she will turn 100 years old.