← ACARA Digital Technologies Years 7–8

Scratch ask and answer as input()

Like Scratch ask and wait: input() shows the prompt, waits for a reply, and the answer is stored in a variable (name), just like the answer reporter.

Understanding Scratch ask and answer as input() in ACARA Digital Technologies Years 7–8

What it does: The prompt text sits inside the brackets and quote marks, just like the words typed into the ask block. The variable colour on the left of = keeps the reply so it can be used again, unlike the single answer reporter that gets overwritten. A clear name like name shows what the answer holds. Using input as a variable name would replace Python's input() function.

Common mistakes: Python has no ask() function. The Scratch ask and wait block is written as input(), so the line should be name = input("Your name? "). The prompt text inside input() is a string, so it needs quotes. It should be colour = input("Colour? ").

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 482–519) and word search (Modules 420–519).

Take this worksheet further — free with Cloodit

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

Learning
Duo
Which Python line matches the Scratch block: ask What is your name? and wait?
name = input("What is your name? ")name = print("What is your name? ")
Matches
name = input(What is your name?)
↓
The prompt text is missing quote marks, so Python thinks it is code instead of text. It should be input("What is your name?").
Applying
Meanings
Term
name = input("What is your name? ")
Meaning
Like Scratch ask and wait: input() shows the prompt, waits for a reply, and the answer is stored in a variable (name), just like the answer reporter.
Practice
name = input("What is your name? ")
Testing
Gaps
name = ("What is your name? ")
Check Answer
Spots
1name = ask("Your name? ")
2print("Hello " + name)

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

The 'Nebula Cat' badge — Orbit Debugger, 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. Which Python line matches the Scratch block: ask What is your name? and wait?
A. name = input("What is your name? ") ✓
B. name = print("What is your name? ")
input() shows the prompt and waits for a reply, like ask and wait. print() only shows text and does not wait for an answer.
2. In Scratch, the answer reporter holds what the user typed. What does Python do instead?
A. Stores the reply in a variable such as name ✓
B. Keeps the reply in a built-in word called answer
Python has no built-in answer reporter. You choose a variable name, and input() puts the reply into it.
3. Where does the prompt text go in Python's input()?
A. After the brackets: input() "Your name? "
B. Inside the brackets, in quotes: input("Your name? ") ✓
The prompt is an argument, so it goes inside the brackets as a string in quotes.
4. Which line stores the user's reply so it can be used later?
A. age = input("How old are you? ") ✓
B. input("How old are you? ")
Without a variable to the left of =, the reply is lost straight after the user types it. Assigning it to age saves it.
5. What happens when Python runs name = input("What is your name? ")?
A. It saves the prompt text in name and carries on straight away
B. It shows the prompt, waits for typing, then saves the reply in name ✓
Just like ask and wait, the program pauses until the user presses Enter. The reply, not the prompt, goes into name.

Match the Pairs

name = input("What is your name? ") → Shows the question, waits for the user to type a reply, and stores it in the variable name
print("Hi " + name) → Uses the stored reply, like putting the Scratch answer reporter into a say block
The question that Scratch shows in ask and wait goes inside the brackets of input() as text in quotes → input("How old are you? ")
The Scratch answer reporter is only available until the next question, so Python stores the reply in a named variable to use later → colour = input("Favourite colour? ")
name = input(What is your name?) → The prompt text is missing quote marks, so Python thinks it is code instead of text. It should be input("What is your name?").
input("What is your name? ") print("Hi " + name) → The reply is never stored in a variable, so name does not exist. It should start with name = input(...).

Key Term

name = input("What is your name? ")
Like Scratch ask and wait: input() shows the prompt, waits for a reply, and the answer is stored in a variable (name), just like the answer reporter.

Fill in the Blanks

1. name = input("What is your name? ")
Hint: Type the Python function that works like the Scratch ask and wait block.
2. name = input("What is your name? ") print("Hi", name)
Hint: Type the variable that holds the reply, like the Scratch answer reporter.
3. name = input("What is your name? ")
Hint: Type the operator that stores the reply in the variable.
4. name = input("What is your name? ") print("Hello", name)
Hint: Type the function that shows the stored answer on the screen.
5. city = input("Which city do you live in? ")
Hint: Type the function that shows the prompt and waits for the user to reply.

Spot the Error

Question 1
A name = ask("Your name? ")
B print("Hello " + name)
C print("Nice to meet you!")
Line A — Python has no ask() function. The Scratch ask and wait block is written as input(), so the line should be name = input("Your name? ").
Question 2
A print("Welcome!")
B colour = input(Colour?)
C print("I like " + colour)
Line B — The prompt text inside input() is a string, so it needs quotes. It should be colour = input("Colour? ").
Question 3
A name = input("Name? ")
B age = input("Age? ")
C print(name, "is", Age)
Line C — Variable names are case-sensitive. The answer was stored in age, not Age, so Python would give a NameError. It should be print(name, "is", age).
Question 4
A print("Hi!")
B pet = input("Your pet? ")
C print("Cute " + "pet")
Line C — Putting quotes around pet makes it plain text, so it prints the word pet instead of the answer. Use the variable: print("Cute " + pet).
Question 5
A print("Say hi")
B answer == input("Reply? ")
C print("You said " + answer)
Line B — A double equals sign (==) compares two values. To store the reply in a variable, use a single equals sign: answer = input("Reply? ").

Student with a class code? Join your class →