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 | |
|---|---|---|
| 1storage | AThis describes input, not storage. Typing a name gets data into the program but does not keep it for later. | |
| 2highScore ← 0 | BThis describes output, not storage. Displaying a score shows data to the user but does not keep it. | |
| 3A high score must still be there next time the game is played, so it is saved in a file | CA variable holding data that is kept only while the program is running | |
| 4Records, such as a student's name and mark, are kept in a database so they can be used again later | DWRITEFILE "scores.txt", highScore | |
| 5Storage: the user types in their name | ESELECT name, mark FROM results | |
| 6Storage: the program shows the final score on the screen | FThe data a solution must keep, in a variable, file or database, so it can be used again later |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
storage — Data the solution must keep, in a variable, file or database, so it can be used again later. It is not the same as input or output.DECLARE HighScore : INTEGER
HighScore ← 0OPENFILE "scores.txt" FOR WRITEOPENFILE "scores.txt" FOR WRITE
WRITEFILE "scores.txt", HighScore
CLOSEFILE "scores.txt"OPENFILE "scores.txt" FOR READ
READFILE "scores.txt", HighScore
CLOSEFILE "scores.txt"INPUT NewScore
HighScore ← NewScore
OUTPUT HighScore