A Level Computer Science OCR Practice Exam 2025 - Free Practice Questions and Study Guide

Question: 1 / 400

What describes a condition controlled loop?

A loop that executes a fixed number of times

A loop that runs until a specific condition is met

A condition-controlled loop is characterized by its operation based on the evaluation of a specific condition. In this type of loop, the execution continues until a particular condition evaluates to false. This allows for flexibility, as the loop can run for an indeterminate number of iterations based on the changing state of the variables involved or other external factors. It is commonly used in programming scenarios where the exact number of iterations is not known beforehand, making it suitable for tasks like reading user input until a sentinel value is reached or processing elements in a data structure until a certain criteria is satisfied.

The other options represent different types of loops. A loop that executes a fixed number of times describes a count-controlled loop, which is predefined based on a specific count. A loop that never terminates describes an infinite loop, which occurs when the loop's exit condition can never be satisfied. Lastly, a loop that depends on user feedback suggests interaction with the end user, but that doesn’t necessarily align with the broad definition of a condition-controlled loop, as it is not restricted to user-driven feedback. Thus, the essence of what makes option B correct lies in its focus on the conditional aspect that determines when the loop stops executing.

Get further explanation with Examzify DeepDiveBeta

A loop that never terminates

A loop that is dependent on user feedback

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy