Political Science, asked by TeeshaAhuja, 10 months ago

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​

Answers

Answered by sayantannandi123
0

Answer:

in java?? I wanted to know that

Answered by 123456789ritka
0

Answer:

INPUT:-

from datetime import datetime

name = input('What is your name? \n')

age = int(input('How old are you? \n'))

hundred = int((100-age) + datetime.now().year)

print ('Hello %s. You are %s years old. You will turn 100 years old in %s.' % (name, age, hundred))

OUTPUT:-

from datetime import datetime

name = input('What is your name? \n')

age = int(input('How old are you? \n'))

hundred = int((100-age) + datetime.now().year)

print ('Hello %s. You are %s years old. You will turn 100 years old in %s.' % (name, age, hundred))

Explanation:

Similar questions