Greet the User
Easy
Write a Python program that asks for a user's name and age, then prints a personalized greeting message.
The program should:
1. Ask for the user's name
2. Ask for their age
3. Print: "Hello, [Name]! You are [age] years old. In 10 years, you will be [age+10]."
The program should:
1. Ask for the user's name
2. Ask for their age
3. Print: "Hello, [Name]! You are [age] years old. In 10 years, you will be [age+10]."
Input
Name (string), Age (integer)
Output
Formatted greeting string
Example
Input
Alice 25
Output
Hello, Alice! You are 25 years old. In 10 years, you will be 35.
Use input() to get user data. Convert age to int() for arithmetic.
⚡ 10 XP on solve
← Back to lesson
Your Solution
Output
Click "Run" to execute your code...
⏳ Loading Python runtime (first run may take a few seconds)...
Log in to submit your solution and earn XP.