Similar Example

Here’s a different example where the program asks the user for their name and age, then calculates how old they will be in 10 years:

# Step 1: Get user input
name = input("Enter your name: ")
age = input("Enter your current age: ")

# Step 2: Convert age to an integer
age = int(age)

# Step 3: Calculate future age
future_age = age + 10

# Step 4: Display the result
print("Hello", name + "! In 10 years, you will be", future_age, "years old.")