Clare's square number 1

Clare's square number 1

Log in to post a comment.

// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(1);

// Global code will be evaluated once.
const turtle = new Turtle();


const size=50; //min=-100 max=100 step=1
const x=0; //min=-100 max=100 step=1
const y=0; //min=-100 max=100 step=1
const count=0; //min=0 max=1000 step=1

const angle=0; //min=2 max=99 step=0.5

turtle.penup();
turtle.goto(x,y);
turtle.pendown();

for(n=0; n<=count; n=n+1){

for(j=0; j<=3; j=j+1){
   turtle.forward(size);
   turtle.right(90);
}

turtle.right(angle);

}