Chapter 2: The Looping Mountains


You step into a canyon of spiraling echoes. Jagged peaks loom above, etched with ancient runes of repetition. Code fragments drift by like leaves in the wind, each looping endlessly through invisible circuits. The air hums with a strange cadence, a rhythm that wraps around your thoughts. “Loop… loop… loop…”

A voice rises from a stone console embedded in the mountainside, glowing with a soft cyan light: “Only by mastering repetition may you climb these heights. Begin the ascent.”

A spiral staircase unfurls ahead — carved from luminous logic and bound by flow control. Each step pulses with potential: for, while, and break. You feel time bending slightly as you move, caught in a rhythm of your own making.

Around you, phantom figures loop in place — ghosts of failed attempts, caught forever in infinite cycles. Their eyes glow faintly, silently warning: “Control the loop, or be consumed by it.”

The Looping Mountains

🌀 Echo Canyon

A code echo repeats endlessly. Make it stop after five loops.



    
    
    

Hint: Add count = 0 before the loop and use while count < 5:. Don’t forget to increase the count!

🪼 Stair of Steps

A stairway appears. Each step forms as you count it with a for-loop.


Hint: Use range(1, 6) to get 1 through 5.


  

🔁 The Looping Gate

A final door blocks your way. It whispers: “Give me only the odd numbers between 1 and 10…”



    
    
    

Hint: Add if i % 2 == 0: continue to skip even numbers in your loop.

🎖️ You Found: The Token of Recursion

The wind stills. A bronze token forms in the air, etched with a spiral. You have mastered the patterns of repetition. Ahead, a glowing gate awaits...