input() pauses your program and waits for the user to type something and press Enter. Whatever they type is handed back as a string, which you usually save in a variable.
name = input("What is your name? ")
print(f"Nice to meet you, {name}!")
The text inside input("...") is the prompt โ the question shown to the user.
๐ฅ๏ธ In this playground
When your code reaches input(), a small pop-up box appears. Type your answer there and press OK. Try it in the Practice tab!
โ ๏ธ input() always gives you text
Numbers from input are strings!
Even if the user types 7, input() returns the string"7". To do math, you must convert it with int() or float().
age = input("How old are you? ")
age = int(age) # convert text to a number
print(f"Next year you'll be {age + 1}")