1. Pyroom
  2. Tutorials
  3. Getting started with Pyroom
  4. Ask the user a question with input()

Ask the user a question with input()

input() pauses your program until the user types an answer. In Pyroom you type it straight into the console, below the output.

Beginner Video coming soon. The steps below show everything the video will cover.

Steps

  1. input shows a question and waits. Whatever the user types is stored in a variable.
  2. Press Run. The program stops at the question and waits for an answer.
  3. Type your answer in the console and press Enter.
  4. The program continues and uses your answer.
Read the transcript

input shows a question and waits. Whatever the user types is stored in a variable.

Press Run. The program stops at the question and waits for an answer.

Type your answer in the console and press Enter.

The program continues and uses your answer.

Try it in the Playground

Nothing to install and no account needed.

Open Playground →