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.
Programming Concepts Typeit
Target Level
4-5
Running Total
0
0%
Attempt
1 of 3
Type the correct answers into the spaces. Fill all the spaces before clicking ‘Check Answers!’
This algorithm asks the user to guess a number between 1 and 20. The algorithm includes validation checks and feedback to the user until they have correctly guessed the number.
guessed ←
target ← 11
WHILE guessed !=
PRINT('Enter a number between 1 and 20')
number ← USERINPUT
WHILE <= OR number > 20
PRINT('Number out of range, try again')
number ← USERINPUT
ENDWHILE
IF number =
guessed ←
PRINT('Well done, you guessed it!')
ELSE IF number > target THEN
PRINT('Too high!')
ELSE
PRINT('')
ENDIF
ENDWHILE