This test is run by .
Note that your final mark will not be saved in the system.
Note that your final mark will not be saved in the system.
Robust and Secure Programming Wipeout
Target Level
4-5
Running Total
0
0%
For this question there
are 6 correct answers. For each correct answer you will score 1 mark.
Be careful, if you get one wrong you are wiped out!
Study the code snippet. Identify the test data that would be rejected and prompt the user to enter another number:
guessed ← False
target ← 11
WHILE guessed != True
PRINT('Enter a number between 1 and 20')
num ← STRING_TO_INT(USERINPUT)
WHILE num <= 0 OR num > 20
PRINT('Number out of range, try again')
num ← USERINPUT
ENDWHILE
IF num = target THEN
PRINT ('Well done, you guessed it!')
guessed ← True
ELSE IF num > target THEN
PRINT('Too high')
ELSE
PRINT('Too low')
ENDIF
ENDWHILE