Code Example
name = input("Enter name: ")
age = int(input("Enter age: "))
print(f"Hello {name}")
print(f"Next year you will be {age + 1}")
Expected Output
Enter name: Mayur
Enter age: 23
Hello Mayur
Next year you will be 24
Practice Steps
- Open the Python compiler and paste the code.
- Run the program, then enter a name and age when the terminal asks.
- Change the message or calculation and run it again.