Code Sketch


chain of Square
By: mary
Category: Art
clear()
setSpeed(medium)
setPenColor(green)
setPenThickness(5)
showAxes()
showGrid()
setFillColor(red)
setBackgroundH(white, blue)

//to draw a square
//forward(100)
//right()
//forward(100)
//right()
//forward(100)
//right()
//forward(100)
//right()
//
//forward(100)
//left
//forward(100)
//left
//forward(100)
//left
//forward(100)
//left
//
//
//
//right()
//forward(100)
//right()
//forward(100)
////right()
//forward(100)
//right()
//forward(100)
//
//left
//forward(100)
//left
//forward(100)
//left
//forward(100)
//left
//forward(100)

//square with repeat

setFillColor(red)

repeat(4){
    forward(100)
    right(90)
}
setPosition(100,100)
repeat(4){
    forward(100)
    right(90)
}

setPosition(200,200)

repeat(4){
    forward(100)
    right(90)
}



//triangle repeat
//
//repeat(3){
//      right(120)
//       forward(100)
//}