×

python · level 1 · unit 2 · lesson 4

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

lets your program ask a question.

input is like a waiter taking your order. It asks a question, waits while the person types an answer and presses Enter, then hands back what they typed as a string.

Store the answer in a variable so you can use it. snack = input("Favourite snack? ") puts whatever they type into the box called snack.

Leave a space at the end of your question, inside the quotes, so the answer does not bump into it.

Your program pauses at input until the person presses Enter.