NZ Level 5
topic badge
Loops

Interactive practice questions

Look at the pseudocode below:

START
SET a = 2
SET sum = 0
WHILE a < 9
    sum = sum + a
    a = a + 1
END WHILE
PRINT sum
END
a

The initial value of a is $\editable{}$.

b

What is the OUTPUT of this code?

OUTPUT: $\editable{}$

Easy
Approx 3 minutes
Sign up to try all questions

Look at the pseudocode below:

Look at the pseudocode below:

Note that the symbol / represents division.

Look at the pseudocode below, and determine the value that is printed at the end of the code:

Note that the symbol > represents the statement 'greater than'.

What is Mathspace

About Mathspace