EZ Programing Demos

Slow motion, step by step, animated demonstrations of basic computer programing techniques

Links to topics:

Current topic:

Set x and y

The turtle commands setx, sety, and setxy let you move the turtle to specific (x, y) coordinates. If the pen is down, the turtle will draw a line as it moves to its new coordinates. These commands do not change the turtle's heading.

 Slow  Medium  Fast 
Click 'Run' to go.

These three commands, setxy, setx, and sety, will let you place the turtle at exact (x, y) coordinates. If the pen is down, the turtle will draw a line as it travels to its new coordinates. If you need to get somewhere without drawing your path, then lift the pen up before relocating.

The command setxy changes both the x- and y-coordinates of the turtle. With it you can draw from any point to any point on the (x, y) graph.

The command setx changes only the x-coordinate. This causes the turtle to move horizontally. And since the sety command will only change the y-coordinate, it will move the turtle vertically.

These commands let you think of the turtle's movement in terms of its coordinates rather than in terms of its travel distance and direction.


Setx moves the turtle horizontally:


Sety moves the turtle vertically:


The flowchart for this demo:


The imaginary computer code for this demo could look like this:

    setxy(-5, 5);


Suggested next article:

At EZ Math Movie

EZ Math Movie is a site that can help you experiment with and understand many topics in mathematics. Its main feature is an interactive animated (x, y) graph that you control with an actual programing language. There are many examples and tutorials, and EZ Math Movie is crossed referenced with both EZ Programing Demos and Zona Land Education.


Zona Land Education is a site with explanations and interactive diagrams covering many topics in physics and mathematics. Zona Land Education is cross referenced with EZ Math Movie, and it contains several animations that use EZ Math Movie's programing language.