Chapter 5: The Looping Labyrinth

You step into the Looping Labyrinth, where time twists in circles. Glowing runes rotate on the walls, repeating patterns of logic and loops.

A voice echoes through the chamber: β€œShape the flame. Forge your tools. Master the function.”

To escape the maze, you must master the art of breaking and escaping loops.


You notice ancient carvings describing looping constructs across the stone walls…

  • πŸ” for loops
  • πŸ” while loops
  • πŸšͺ break statements
  • ↩️ continue statements
Looping Labyrinth

πŸ” Puzzle 1: Escape the Infinite

A loop traps time. Your goal is to make it print only five times.



    
    
    

Hint: Use a counter like count = 0 and while count < 5. Don’t forget to increment it!

πŸ”„ Puzzle 2: Skip the Trap

Print only odd numbers between 1 and 10. Use continue.



    
    
    

Hint: Use if i % 2 == 0: continue to skip even numbers.

πŸšͺ Puzzle 3: Break the Seal

Break out of a loop when you reach number 7.



    
    
    

Hint: Add if i == 7: break inside the loop.

πŸŽ‰ Loopbreaker Sigil Acquired

You cracked the logic loops and escaped the maze. The path forward unfolds.