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 | |
|---|---|---|
| 1OPENFILE "Scores.txt" FOR WRITE | AOPENFILE "Marks.txt" FOR WRITE | |
| 2OPENFILE "Names.txt" FOR WRITE WRITEFILE "Names.txt", Name | BThe file is opened first, then data is written into it | |
| 3The file name is a string in quotes, then the mode FOR WRITE states that you will write to the file | CThe file name is missing its quotation marks. The file identifier must be a string such as "Scores.txt". | |
| 4Keywords such as OPENFILE and FOR WRITE are written in capital letters in 0478 pseudocode | DWRITEFILE is used before the file is opened. OPENFILE ... FOR WRITE must come first. | |
| 5WRITEFILE "Scores.txt", Score OPENFILE "Scores.txt" FOR WRITE | EOpens the file Scores.txt in write mode so data can be written into it | |
| 6OPENFILE Scores.txt FOR WRITE | FOPENFILE "Results.txt" FOR WRITE |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
OPENFILE "Scores.txt" FOR WRITE — Opens the file Scores.txt in write mode so data can be written into it with WRITEFILE. The file must be opened before writing. Keywords are in capitals.OPENFILE "Scores.txt" FOR WRITEOPENFILE "Scores.txt" FOR WRITEOPENFILE "Scores.txt" FOR WRITEOPENFILE "Scores.txt" FOR WRITE
WRITEFILE "Scores.txt", ScoreOPENFILE "Names.txt" FOR WRITE
WRITEFILE "Names.txt", Name