Code Sketch


Activity03_kojo HH 08
By: Rajiv Malik
cleari ()
setPenColor(Color(0, 0, 253))
setSpeed(fast)
right(90)
setPenColor(blue)
setPenThickness(10)
showAxes()
turn(45)
setFillColor(red)
def square(steps:Long):Unit=
if(steps==0) {
   ()
}else {
  forward(100)
   turn(90)
  
  square(steps-1) 
   }

square(4)

turn(-180)

def square1(steps:Long):Unit=
if(steps==0) {
   ()
}else {
  forward(100)
   turn(90)
  
  square1(steps-1) 
   }

square1(4)