# input() pauses the program and waits for the user to type something
# What the user types becomes a value you can use

# Basic input
name = input("What is your name? ")
print("Hello", name)

# input() always returns a string — even if you type a number
age = input("Enter your age: ")
print(type(age))   # <class 'str'>

# Convert to int if you need a number
age = int(input("Enter your age: "))
print(type(age))   # <class 'int'>

# Convert to float if you need a decimal
height = float(input("Enter your height: "))
print(type(height))  # <class 'float'>

# Combining input with f-strings
name = input("Enter your name: ")
age = int(input("Enter your age: "))
print(f"Hi {name}, you are {age} years old.")

# A real example — simple age calculator
name = input("Enter your name: ")
year = int(input("Enter the current year: "))
birth = int(input("Enter your birth year: "))

age = year - birth
print(f"{name} is approximately {age} years old.")
