Step 1 of 5

Step 1 · Read and run

Your first question

So far your programs have done the same thing every time. input() changes that: it lets the person using the program type something in.

input("What's your name? ") does three things:

  1. It shows the question.
  2. It waits until something is typed and Enter is pressed.
  3. It gives back what was typed, so you can store it in a variable.

Run it. A box appears under the output: type your name and press Enter.

Run the program to carry on.
hello.py

Output

Press Run to see what your program prints.