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 2024
This test is run by guest.
Note that your final mark will not be saved in the system.

1 - Programming Typeit

Target Level
C
Running Total
0
0%
Attempt
1 of 3

Type the correct answers into the spaces. Fill all the spaces before clicking ‘Check Answers!’

Complete each of the following algorithms so that the behaviour of each algorithm matches the comment. There should be no spaces in any of the answers, and inclusion of a space may actually invalidate a correct answer.



//Loop should run 10 times

for x = 5 to  

    //output should be the ten times table, i.e. 10, 20, 30…100

    print((x –  ) *  )

//end of the loop

  x

 

//This algorithm should only output even numbers

for x = 1 to 10

    if x   2   0 then

        print( )

    endif

//this is where the end of the loop would be, but we're not going to give away the answer to a previous question

 

x = 3

//The loop should take place 7 times

while x   10

    x = x   1

   //The numbers output should be square numbers, i.e. 1, 4, 9, 16, 25, 36, 49

    print((x  )   2)

endwhile


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

Pass Mark
69%