Which loop repeats until the condition becomes true?

Enhance your understanding of IGCSE Algorithms and Pseudocode Foundations. Engage with flashcards and multiple-choice questions, each offering hints and explanations. Prepare thoroughly for your exam!

Multiple Choice

Which loop repeats until the condition becomes true?

Explanation:
The idea being tested is how loop termination works when the loop continues “until” a condition is true. A repeat-until loop runs its body and then checks the condition; if the condition is false, it repeats, and it stops as soon as the condition becomes true. It also guarantees at least one execution of the loop body. This matches the description of repeating until the condition becomes true, which is exactly what a repeat-until structure does. In contrast, a for loop is driven by a counter or a fixed number of iterations and isn’t defined by “repeat until the condition is true.” A case statement is a branching decision, not a loop, and a return statement exits a function, not a loop.

The idea being tested is how loop termination works when the loop continues “until” a condition is true. A repeat-until loop runs its body and then checks the condition; if the condition is false, it repeats, and it stops as soon as the condition becomes true. It also guarantees at least one execution of the loop body.

This matches the description of repeating until the condition becomes true, which is exactly what a repeat-until structure does. In contrast, a for loop is driven by a counter or a fixed number of iterations and isn’t defined by “repeat until the condition is true.” A case statement is a branching decision, not a loop, and a return statement exits a function, not a loop.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy