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 | |
|---|---|---|
| 1OUTPUT Score | AOUTPUT "Enter your age: " | |
| 2OUTPUT "You have ", Lives, " lives left" | BOUTPUT "Game over" | |
| 3OUTPUT can show a plain message to the user in quote marks | CDisplays the current value stored in the variable Score on the screen | |
| 4OUTPUT can be used as a user prompt to tell the user what to enter before an INPUT | DDisplays text, then the value of Lives, then more text, all in one command | |
| 5OUTPUT "You have " Lives " lives left" | EThe items are not separated by commas, so the command is invalid. Commas are needed between the text and the variable. | |
| 6OUTPUT "Score" | FThe variable name is in quotes, so it displays the word Score instead of the value stored in the variable. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
OUTPUT — Displays text or values on screen. Text goes in quotes. Items are separated by commas, e.g. OUTPUT "You have ", Lives, " lives left". Also used for user prompts.Score ← 50
OUTPUT ScoreLives ← 3
OUTPUT "You have ", Lives, " lives left"OUTPUT "Enter your name: "
INPUT NameName ← "Sam"
Score ← 42
OUTPUT Name, " scored ", ScoreName ← "Sam"
OUTPUT "Hello ", Name, "!"