Python Break & Continue Statement Exercises
Let’s check out some exercises that will help understand Break and Continue statements better.
Exercise 10-a: Break statement inside a For Loop
Place a break statement in the for loop so that it prints from 0 to 7 only (including 7).
Exercise 10-b: If and Continue statements inside a For Loop
Add an if statement and a continue statement to the loop so that it skips when iterator equals "sun".
Need More Exercises?
Check out Holy Python AI+ for amazing Python learning tools.
*Includes 14 more programming languages, inspirational tools and 1-on-1 consulting options.
*Includes 14 more programming languages, inspirational tools and 1-on-1 consulting options.
Umut Sagir
Finance & Data Science Professional,
Founder of HolyPython
Founder of HolyPython