Bird
0
0

What is the effect of the continue statement when encountered inside a for loop in Python?

easy📝 Conceptual Q1 of 15
Python - Loop Control
What is the effect of the continue statement when encountered inside a for loop in Python?
AIt pauses the loop until user input is received
BIt terminates the entire loop immediately
CIt skips the rest of the current iteration and moves to the next iteration
DIt restarts the loop from the first iteration
Step-by-Step Solution
Solution:
  1. Step 1: Understand continue behavior

    The continue statement skips the remaining code inside the loop for the current iteration.
  2. Step 2: Effect in for loop

    After skipping, the loop proceeds to the next iteration immediately.
  3. Final Answer:

    It skips the rest of the current iteration and moves to the next iteration -> Option C
  4. Quick Check:

    Does it stop the loop? No. Does it skip current iteration? Yes. [OK]
Quick Trick: Continue skips current iteration, moves to next [OK]
Common Mistakes:
MISTAKES
  • Confusing continue with break
  • Thinking continue restarts the loop
  • Assuming continue pauses the loop

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Python Quizzes