ExamBank Scot · N5 Computing Science question bank · All N5 Computing Science questions
2 marks · Input validation
This pseudocode allows a user to enter the level they wish to start playing a game. Line 1 RECEIVE level FROM (INTEGER) KEYBOARD Line 2 WHILE level < 1 OR level > 10 DO Line 3 Line 4 SEND “error : please re-enter level” TO DISPLAY RECEIVE level FROM (INTEGER) KEYBOARD Line 5 END WHILE Explain what happens if a user enters 12.
An error is displayed (1 mark for exemplifying line 3) User re-enters a level (1 mark for exemplifying line 4)