Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1ASK "What is your name?" and store in name | ASHOW comes before ASK, so the variable name has no value yet. ASK must come first so the answer is stored before it is shown. | |
| 2SHOW "Welcome to the game!" | BSHOW "Hello, " and name | |
| 3Using the stored answer in a later step, so the message includes the user's name | CASK was used to display a message, but ASK is for input. SHOW should be used to display a message. | |
| 4An input step asks the user for a value and stores it in a variable | DAn input step: it asks the user for their name and keeps the answer in the variable called name | |
| 51. SHOW name 2. ASK "What is your name?" and store in name | EAn output step: it displays a message on the screen for the user to read | |
| 6ASK "Hello, " and name | FASK "What is your favourite colour?" and store in colour |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
ASK and SHOW — ASK is an input step: it asks the user for a value and stores it in a variable. SHOW is an output step: it displays a result, like a message, on the screen.name ← ASK "What is your name?"name ← ASK "What is your name?"
SHOW "Hello, " + namename ← ASK "What is your name?"
SHOW "Hello, " + namename ← ASK "What is your name?"
SHOW "Nice to meet you, " + namename ← ASK "What is your name?"
SHOW "Welcome, " + name