Your result

kody
Join Kody

Repeat around the bend

Change activity
Loop bodies

Repeat around the bend

Goal

Find a four-move body that reaches the flag when repeated twice.

Game board

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

Repair mission

1 edit available

Run or step through the broken pseudocode. Replace one line to reach the goal.

Pseudocode

0 / 4 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
Loop bodies

Separate a loop body from its execution count.

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

Complete the pseudocode and concept check.

Show a hint

The same moves must work from the start of both iterations.

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.

Return to Tower level 1

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