← Python

input() function

input() reads text typed by the user and returns it as a string

What it does: input("Name") is valid syntax with matching double quotes. input() displays the prompt string, then pauses until the user presses Enter. The prompt is optional — without it, input() just waits silently. The prompt must be a string in quotes — otherwise Python looks for a variable called Hi. Both display text, but only input() stops and waits for a response. Python accepts both single and double quotes for strings. Without quotes around the text, Python tries to evaluate it as code — a syntax error.

Common mistakes: Misspelling: imput. Missing closing bracket.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a journey and assign it to your class.

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does input("Name: ") do?
Shows 'Name: ' then waitsShows 'Name: ' then continues
Matches
❌ input("Name')
Mismatched: Quotes
Applying
Meanings
Term
input('Press Enter')
Meaning
Pauses program and waits for user to press Enter key.
Practice
input('Name: ')
Testing
Gaps
('Name: ')
Check Answer
Spots
1print('Welcome')
2imput('Name: ')

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Seal' badge — Smooth Formatter, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does input("Name: ") do?
A. Shows 'Name: ' then waits ✓
B. Shows 'Name: ' then continues
input() displays the prompt string, then pauses until the user presses Enter
2. What does input() without a prompt show?
A. The word 'input()'
B. Nothing - just waits for input ✓
The prompt is optional — without it, input() just waits silently
3. When does the program continue after input()?
A. After user presses Enter ✓
B. Immediately
input() always waits — the program is paused until Enter is pressed
4. What does input('Age: ') display?
A. input('Age: ')
B. Age: ✓
input() prints the prompt string itself — not the function call
5. Which is correct?
A. input("Hi") ✓
B. input(Hi)
The prompt must be a string in quotes — otherwise Python looks for a variable called Hi

Match the Pairs

input("Name') Mismatched: Quotes
input(Name) Error: Missing quotes
input("Name") Valid: Syntax
input() Ok: No prompt
input('>>> ') Shows: >>> then waits
input('Age: ') Shows: Age: then waits

Key Term

input('Press Enter')
Pauses program and waits for user to press Enter key.

Fill in the Blanks

1. input('Name: ')
2. input('Age: ')
3. input('City: ')
4. input('Email')
5. input('Press Enter')

Spot the Error

Question 1
A print('Welcome')
B imput('Name: ')
C input('Age: ')
Line B — Misspelling: imput
Question 2
A input('First name: ')
B input('Last name: '
C input('Email: ')
Line B — Missing closing bracket
Question 3
A print('Registration')
B input('Name: ')
C Input('Age: ')
D input()
Line C — Capital I error
Question 4
A input('Username: ')
B input(Password: ')
C print('Login complete')
Line B — Missing opening quote
Question 5
A print('Enter details')
B input('Name: ')
C input('Age: ')
D input 'City: ')
Line D — Missing opening bracket
For Teachers

Create a free class, add this module to a journey, and track who's stuck.

Create a free teacher account →

No credit card. No setup fee. Make a class and invite students in under three minutes.

For Students

Practice this topic interactively, track progress, and unlock badges.

Start Learning Free →

Have a class code?