OneCompiler

Practice

1644

def greet_user():
# Get user input for name and age
name = input("Enter your name: ")
age = int(input("Enter your age: "))

# Calculate the age in 5 years
age_in_5_years = age + 5

# Print the greeting and age message
print(f"Hello, {name}!")
print(f"In 5 years, you will be {age_in_5_years} years old.")

Call the function

greet_user()