Your result

kody
Join Kody

Beginner · Level 2

TOWER LEVEL 2

Find the pattern

Loops

The Loop Trail

Goal

Reach column 5, row 2 without leaving the path.

Game board

Not run
Reach the flag0 crystals left
Board guide
Your explorerFollow the pathGoal

Pseudocode

0 / 3 instructions

Add moves below. Kody moves when you press Run.

Add a move to start your pseudocode

Add instructions, then run your pseudocode.

Edit steps
How it works
Loops

Trace a repeated sequence and identify the current iteration.

Key rule

Instructions run from top to bottom. Columns increase to the right; rows increase downward. Coordinates shown to you start at 1. repeat runs the entire chosen body exactly twice.

Worked example
Different example: repeat 2 times: kody.move_right() moves two columns right, if both tiles are on the path.
Win condition

Finish on the flag with no crystals remaining, using at most 3 body instructions. Enable repeat: the body must run twice.

Show a hint

Trace the path one move at a time. Find a body that works twice, using at most 3 moves.

Related modules
Keyboard & tips

Focus the game, then use arrow keys to add moves and Enter to run. Select an instruction to move or remove it. With an instruction focused, Alt + Left/Right reorders it and Delete removes it.

About this level

Trace a repeated sequence and identify the current iteration.

These trials stay in this browser and grant no saved progress or rewards.

Report an issue

WELCOME TO KODY

A little play. A lot of possibility.

I’m Kody, your coding companion. Your adventure is ready. Let’s find our way around.

Log in