When writing an algorithm, which is closest to how selection is used?

(1 point)
Responses

to randomize results

to randomize results

to repeat a step

to repeat a step

to ask a question

to ask a question

to test for bugs

1 answer

In the context of writing an algorithm, selection is closest to "to ask a question."

Selection involves making decisions based on certain conditions, which often means evaluating a question that leads to different paths of execution in the algorithm depending on the answer (true or false).