Which term describes the choice of which route to take through a computer program based on a condition?

Study for the End of Year 8 Computer Science Test. Prepare with flashcards and multiple choice questions, each with hints and explanations. Get ready for your exam!

Multiple Choice

Which term describes the choice of which route to take through a computer program based on a condition?

Explanation:
Deciding which route to take through a program based on a condition is a flow of control technique called selection. It lets the program branch into different paths depending on whether the condition is true or false, using constructs like if statements or switch statements. This is different from running steps in a fixed order (sequence) or breaking a problem into smaller parts (decomposition). A flowchart can illustrate a decision point, but the action described by the question—choosing between alternatives based on a condition—is what selection represents.

Deciding which route to take through a program based on a condition is a flow of control technique called selection. It lets the program branch into different paths depending on whether the condition is true or false, using constructs like if statements or switch statements. This is different from running steps in a fixed order (sequence) or breaking a problem into smaller parts (decomposition). A flowchart can illustrate a decision point, but the action described by the question—choosing between alternatives based on a condition—is what selection represents.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy