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 | |
|---|---|---|
| 1INPUT Number | ADisplays the message Total is followed by the value stored in Total | |
| 2OUTPUT "Total is ", Total | BINPUT must be followed by a variable name to store the value in, not a message. Use OUTPUT for the message, then INPUT Number. | |
| 3Prompt the user first so they know what to enter, then read their value | CTotal is in quotes so the word Total is displayed instead of the variable's value. Remove the quotes around Total. | |
| 4Show a variable's value on screen after a text label | DReads a value typed by the user and stores it in the variable Number | |
| 5INPUT "Enter a number" | EOUTPUT "Enter a number" INPUT Number | |
| 6OUTPUT "Total is ", "Total" | FOUTPUT "Total is ", Total |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
INPUT and OUTPUT — INPUT stores a value from the user in a variable, e.g. INPUT Number. OUTPUT shows a message or value on screen, e.g. OUTPUT "Total is ", Total. Prompt first so users know what to enter.INPUT NumberOUTPUT "Total is ", TotalOUTPUT "Enter a number"
INPUT Number
Total ← Total + NumberTotal ← Total + Number
OUTPUT "Total is ", TotalOUTPUT "Enter a mark"
INPUT Mark
Total ← Total + Mark