Scratch say block as print()

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Scratch say block as print()

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which Python line matches the Scratch block: say Hello!
A say("Hello!")
B print("Hello!")
2. True or false: print("Hi there") shows the words Hi there on screen, a bit like a Scratch say block.
A True
B False
3. Which line is written correctly to show the text Welcome in Python?
A print("Welcome")
B print(Welcome)
4. What does the Scratch block say Good luck! become in Python?
A print(Good luck!)
B print("Good luck!")
5. Which Python code is the closest match to the Scratch block: say Hello! for 2 seconds?
A There is no direct match. print("Hello!") shows the text but has no timer.
B print("Hello!", 2)

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1print("Hello!") APython has no direct match for say for 2 seconds. Adding 2 inside print() does not make a timer, it just prints an extra 2. It should be print("Hello!").
2print("Go team!") Bprint("Good luck!")
3In Python, the text you want to show must be wrapped in quotes inside print() CThe Python version of the Scratch block say Hello!. It shows the text on screen.
4Scratch say Good luck! becomes this Python line DThe Python version of the Scratch block say Go team!
5print(Hello!) EThe text has no quotes around it. Python thinks Hello is a name, not text, so the line gives an error. It should be print("Hello!").
6print("Hello!", 2) Fprint("Hi there")

Definitions

print("Hello!")

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
_____("Hello!")
2.
_____("Welcome to my game!")
3.
# Scratch ___ block = Python print print("Hello!")
4.
message = "Hi there!" print(_______)
5.
print("Hi, I am a robot!") _____("Nice to meet you!")

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A # say Hello! block
B print("Hello!")
C print("Welcome to my game")
D print("Let's play!)
Question 2
A # Robot greets the player
B print("Hi, I am Robo!")
C print("What is your name?")
D Print("Nice to meet you!")
Question 3
A print("Welcome!")
B print(Press space to start)
C print("Good luck!")
Question 4
A # Scratch: say Hello!
B say("Hello!")
C print("I am a sprite")
Question 5
A print("Ready?")
B print("Set...")
C print "Go!"
D print("Game over")

Answer Key

Scratch say block as print()
Section A: Quick Questions
Q1
B — print("Hello!")
Q2
A — True
Q3
A — print("Welcome")
Q4
B — print("Good luck!")
Q5
A — There is no direct match. print("Hello!") shows the text but has no timer.
Section B: Match the Pairs
Q1
print("Hello!") → The Python version of the Scratch block say Hello!. It shows the text on screen.
Q2
print("Go team!") → The Python version of the Scratch block say Go team!
Q3
In Python, the text you want to show must be wrapped in quotes inside print() → print("Hi there")
Q4
Scratch say Good luck! becomes this Python line → print("Good luck!")
Q5
print(Hello!) → The text has no quotes around it. Python thinks Hello is a name, not text, so the line gives an error. It should be print("Hello!").
Q6
print("Hello!", 2) → Python has no direct match for say for 2 seconds. Adding 2 inside print() does not make a timer, it just prints an extra 2. It should be print("Hello!").
Section C: Definitions
Q1
print("Hello!") — Python version of the Scratch say block. It shows the text inside the quotes on screen, so say Hello! becomes print("Hello!"). Python has no direct match for say for 2 seconds.
Section D: Fill in the Blanks
Q1
print("Hello!")
Q2
print("Welcome to my game!")
Q3
# Scratch say block = Python print print("Hello!")
Q4
message = "Hi there!" print(message)
Q5
print("Hi, I am a robot!") print("Nice to meet you!")
Section E: Spot the Error
Q1
D — The text is missing its closing quote. Text inside print() must start and end with a quote, like the text in a say block. It should be print("Let's play!").
Q2
D — Python is case sensitive, so Print with a capital P is not the print function. It should be print("Nice to meet you!").
Q3
B — The text has no quotes around it. Python needs quotes around text so it knows it is words to show, not code. It should be print("Press space to start").
Q4
B — Python has no say() function. The Scratch say block becomes print(), so the line should be print("Hello!").
Q5
C — In Python 3, print is a function, so the text must go inside brackets. It should be print("Go!").