Remember: Python reads one line at a time, top to bottom. Print shows the text inside the quotes, and an error message is a clue.
Read and answer
Read the story, then answer.
Bo learns to say helloAt Robot Club, Zara wants Bo to greet every visitor. Ms. Ito says the language is called Python, and a computer reads it one line at a time. Zara types print("Hello") and runs it, and Bo's screen shows the word Hello. She adds a second line, and Python reads line one and then line two, from the top down. Leo tries his own line, but he forgets the last quote. A message pops up and points at his line. Zara says it is an error message, and it is a clue, not a telling-off.
1
Zara runs print("Hello"). What does Bo's screen show?
⌨️print("Hello")👋Hello🚫Nothing at all
2
Python reads a program from the line down.
toplastmiddle
3
The word print is a command that shows something on the screen.
TrueFalse
4
Zara runs this two-line program. What does Bo's screen show?
Hello, then I am BoI am Bo, then HelloHello and I am Bo are never shown
5
One of these lines has a mix-up to fix. Which one?
print("I am Bo")print("Hi Zara")Print("Hello")
6
Python reads a program from the bottom up.
TrueFalse
Match, order and fix
7
Join each piece to what it is.
1print
2"Hello"
3input
Atext, because of the quotes
Ba command that asks a person to type
Ca command that shows a message
8
Zara runs her two-line program. Put what happens in order.
Python reads line two
Bo's screen shows I am Bo
Bo's screen shows Hello
Python reads line one
9
Leo types print("Hello Leo) and the message points at it. What is the mix-up to fix?
The closing quote is missingThe word print needs a capital letterThe brackets are not needed
10
An error message means the computer is broken.
TrueFalse
11
Text goes inside so Python knows it is text.
quotesnumberscommas
12
Write a line of Python that shows the word robot on the screen.
13
Draw Bo's screen after the line print("Hi Zara") runs.
Scan the code at the top to mark this sheet on screenTake a photo of your answers or type them. It is marked for you automatically, and your score is kept.