WACE Computer Science Practice Questions
The 64 practice questions inside the WACE Computer Science Mastery Pack, grouped by area of study. Every question comes with a full worked solution.
- Unit 3 - Programming
- Multiple choice × 18
- Complete × 1
- Write × 2
- Explain × 1
- Identify × 1
- Units 3 and 4 - Ethical and legal issues
- Multiple choice × 4
- Discuss × 1
- Outline × 1
- Unit 3 - Network communications
- Multiple choice × 10
- Calculate × 1
- Compare × 1
- Analyse × 1
- Describe × 1
- Unit 4 - Cyber security
- Multiple choice × 6
- Outline × 1
- Analyse × 1
- Explain × 1
- Unit 4 - Data management
- Multiple choice × 10
- Normalise × 1
- Write × 1
Original practice item. A weather logger runs the pseudocode below. Complete a trace table (desk check) using the test inputs 12, -4, 9, 0, with the columns reading, reading > 0, total, count, reading == 0 and output. State the final output. (4 marks)
total = 0
count = 0
REPEAT
INPUT(reading)
IF reading > 0 THEN
total = total + reading
count = count + 1
END IF
UNTIL reading == 0
average = total / count
PRINT("Average: ", average)Show the worked answer
Answer: Worked solution
Trace table (one row per pass of the post-test loop):
| reading | reading > 0 | total | count | reading == 0 | output |
|---|---|---|---|---|---|
| 12 | TRUE | 12 | 1 | FALSE | |
| -4 | FALSE | 12 | 1 | FALSE | |
| 9 | TRUE | 21 | 2 | FALSE | |
| 0 | FALSE | 21 | 2 | TRUE | Average: 10.5 |
The loop body runs four times. The negative reading fails the IF test, so total and count do not change. On the fourth pass reading == 0 is TRUE, so the loop exits after the body has run, and the post-test loop also processes the terminating 0 (it is not added because 0 > 0 is FALSE). average = 21 / 2 = 10.5, so the output is Average: 10.5.
Marking guide (4 marks): 1 mark for each correct row (4 x 1 mark): row 1 (12, TRUE, 12, 1, FALSE); row 2 (-4, FALSE, 12, 1, FALSE); row 3 (9, TRUE, 21, 2, FALSE); row 4 (0, FALSE, 21, 2, TRUE, output Average: 10.5). A row with any wrong value earns no mark for that row; carry an earlier error forward if later rows follow correctly from it. Accept TRUE/FALSE written as T/F or True/False.
20 full-length practice exams with worked solutions, 20 revision notes, 64 practice questions and 200 flashcards.
Preview a sample note and question free on the WACE Computer Science hub →