Turtle Commander - Command Reference

Basic Commands

Command Description Example
go X Moves the turtle forward by X pixels. go 50 (Moves forward 50 pixels)
turn X Rotates the turtle by X degrees (clockwise). turn 90 (Turns right by 90°)
turn -X Rotates the turtle counterclockwise by X degrees. turn -45 (Turns left by 45°)

Looping (Repeating Commands)

Command Description Example
to i in X Starts a loop that repeats X times. to i in 5 (Start loop that runs 5 times)
off Ends the loop execution. off (Closes the loop)

Examples

1. Draw a Triangle

go 100
turn 120
go 100
turn 120
go 100
    

2. Draw a Rectangle

go 150
turn 90
go 100
turn 90
go 150
turn 90
go 100
    

3. Draw a Spiral

to i in 30
go i * 5
turn 30
off
    

4. Draw a Star

to i in 5
go 100
turn 144
off
    

5. Draw a Circle

to i in 36
go 10
turn 10
off
    

How to Use

1. Enter commands in the input box of the Turtle Commander.

2. Write one command per line.

3. Press "Run" to execute the commands.