Ask your own question, for FREE!
Computer Science 20 Online
Gucchi:

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

Gucchi:

am i right with C?

Gucchi:

@vocaloid

Vocaloid:

you may be confusing for loops and while loops a *for* loop is better when you know exactly how many repetitions you need, but a *while* loop doesn't define a specific number of repetitions, but rather runs until the condition is false

Gucchi:

so its either a or d

Gucchi:

i think d is the best from what you explained..

Vocaloid:

yup, D is better A is contrary to the purpose of a loop in the first place (to set up an action that will occur only if a condition is met)

Gucchi:

thank you

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!