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 | |
|---|---|---|
| 1WRITEFILE "Scores.txt", Score | AWrites the value stored in the variable Score into the open file Scores.txt | |
| 2WRITEFILE "Names.txt", PlayerName | BWrites the STRING held in PlayerName into the open file Names.txt | |
| 3Open the file in WRITE mode first, then use WRITEFILE to store the value of Score | CWRITEFILE "Marks.txt", Mark | |
| 4The file identifier comes first, then a comma, then the variable to write | DThe comma between the file identifier and the variable is missing. | |
| 5WRITEFILE Score, "Scores.txt" | EThe arguments are the wrong way round. The file identifier must come first, then the comma, then the variable. | |
| 6WRITEFILE "Scores.txt" Score | FOPENFILE "Scores.txt" FOR WRITE WRITEFILE "Scores.txt", Score |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
WRITEFILE "Scores.txt", Score — Writes the value stored in a variable into an open file. Give the file name, a comma, then the variable. The file must already be open in WRITE mode.WRITEFILE "Scores.txt", ScoreScore ← 85
OPENFILE "Scores.txt" FOR WRITE
WRITEFILE "Scores.txt", ScoreOPENFILE "Scores.txt" FOR WRITE
WRITEFILE "Scores.txt", ScoreName ← "Ava"
OPENFILE "Names.txt" FOR WRITE
WRITEFILE "Names.txt", NameOPENFILE "Scores.txt" FOR WRITE
WRITEFILE "Scores.txt", Score