Computational constructs test questions

1

What does the following line of code do?

SET result TO a * 5

2

Which of the following lines of code would divide one variable by another variable and store the answer in another variable?

3

If you ran the following piece of code what value would be stored in the variable called 'answer'?

SET answer TO 10/5

4

What does this code do?

RECEIVE mark FROM (INTEGER) KEYBOARD

IF mark ≥ 50 THEN

SEND “You passed, well done” TO DISPLAY

ELSE

SEND “Sorry, try again, you did not pass” TO DISPLAY

END IF

5

If we have a piece of code that uses iteration, what does this mean?

6

What is a count-controlled/fixed loop?

7

Which of these programming constructs would NOT allow you to loop code?

8

This piece of code is an example of what?

SET shoe_size TO 9

9

Programs do things in order and the order is made up of three steps. What step is missing below?

Input, process, ----------?