PYTHON BASICSChapter 1 · Python Basics
Asking for input
input() pauses the program and returns whatever the user types, always as a string. Put a message in the parentheses to show a prompt. In this editor you type your answers into the Input box under the code: one line for each input() call.
Worked example
How it reads
input("...")shows the prompt and returns the typed text- Wrap it in
int(...)when you need a number - Each
input()reads the next line of the Input box
Common mistakes
age = input("Age? ")followed byage + 1raises TypeError: you cannot add a number to a string.

Cloud tip: Always convert numeric input:
int(input(...)). Without it, age + 1 fails because age is text.

