When should the while loop be used in Python?
A. When a condition is not necessary for the action to repeat
B. When the range of repetitions includes positive and negative numbers
C. When an action will be repeated for a specific number of repetitions
D. When the exact number of repetitions is unknown

Respuesta :

Answer:

When an action will be repeated for a specific number of repetitions

Explanation:

in general a while loop is used if you want an action to repeat itself until a certain condition is met i.e. if statement. An for loop is used when you want to iterate through an object. i.e. iterate through an array.

Otras preguntas