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 "Enter age" | AIn the trace table, write the prompt text Enter age in the OUTPUT column on this step. No variable column changes. | |
| 2INPUT Age (test data: 15) | BINPUT Mark | |
| 3A prompt shown to the user is recorded in the OUTPUT column of the trace table | CThe prompt text was written in the Mark variable column. A prompt is output, so it belongs in the OUTPUT column. | |
| 4The test value the user types is recorded in the column of the variable named in the INPUT | DOUTPUT "Enter a mark" | |
| 5Step: INPUT Score (test data 40). Trace table: OUTPUT column = 40, Score column left empty | EIn the trace table, write 15 in the Age column on this step. Nothing goes in the OUTPUT column. | |
| 6Step: OUTPUT "Enter a mark". Trace table: Mark column = Enter a mark, OUTPUT column left empty | FThe typed value 40 was written in the OUTPUT column. It belongs in the Score column because INPUT assigns it to that variable. |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
Trace table INPUT — A prompt is written in the OUTPUT column. The value the user types for an INPUT is written in that variable's column on that step, taken from the test data.OUTPUT "Enter your age"
INPUT AgeOUTPUT "Enter a score"
INPUT Score
OUTPUT ScoreOUTPUT "Enter your name"
INPUT NameOUTPUT "Enter a number"
INPUT Num
Total ← Total + NumDECLARE Age : INTEGER
OUTPUT "Enter your age"
INPUT Age