Calculating years until you turn 100

Report a typo

Develop a basic Python program that solicits the user's name and age, calculates the number of years until they will be 100 and prints a friendly message including this information. Your task is to fill the blanks in code to accomplish these objectives.

Fill in the gaps with the relevant elements
name = ("What is your name? ")
age = (input("How old are you? "))
years_to_hundred = 100 - age
("Hello, " + name + ". You will be 100 years old in " + str(years_to_hundred) + " years.")
printintinput

Create a free account to access the full topic