Our site uses cookies. Some of the cookies we use are essential for parts of the site to operate and have already been set. You may delete and block all cookies from this site, but parts of the site will not work. To find out more about cookies on this website, see our Cookie Policy
Accept
© eRevision.uk and ZigZag Education 2025
This test is run by .
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



This is your 1st attempt! You get 3 marks for each one you get right. Good luck!

Pass Mark
69%