QUESTION IMAGE
Question
problem 3 - age in the future
ask the user for their name and age. then print out how old they will be in 10 years.
example:
input: sarah
input: 15
output: sarah, in 10 years you will be 25.
Step1: Get user name
Let the user input their name.
Step2: Get user age
Let the user input their age, assume the age is $a$.
Step3: Calculate future age
The age in 10 years is $a + 10$.
Step4: Print result
Print the name and the future - age in the required format.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
Here is a Python code example to solve this problem:
name = input("Please enter your name: ")
age = int(input("Please enter your age: "))
print(f"{name}, in 10 years you will be {age + 10}.")