Chapter 3: testing conditionals. Question 3 of 9


Conditionals
1 Instruction
2 Instruction
3 IF Test 111 THEN
4      Instruction
5 ELSE
6      IF Test 222 THEN
7      |     Instruction
8      ELSE
9      |     Instruction
10      END IF
11 END IF
12 End of the program

In the program shown opposite, the line marked with an arrow will be executed.

After execution, which line will the program jump to?

Note: the condition "Test 111" will give a FALSE result.

Click on the button corresponding to the line the program will jump to after execution of the line marked with an arrow. Then click on "Check my answer".

Line 3 is a conditional control structure, and the result of the condition test will have an effect on the rest of the program.

In this case, since the test result is FALSE, there will be a line break.

Since ELSE exists, the program will jump to the line following the corresponding ELSE, i.e. to line 6..

Next question

Stop the test