Conditionals | and Flow Control | Question 7

Last Updated :
Discuss
Comments

Q7-What is the primary purpose of a while loop in Python?

A. To define a function.

B. To create an infinite loop.

C. To iterate over a sequence of elements.

D. To repeatedly execute a block of code as long as a condition is true.

Share your thoughts in the comments