Chapter 3: testing conditionals. Question 2 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 TRUE 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 TRUE, the program will continue on to the next line (4), with no line feed.

Next question

Stop the test