Code Sketch


yadnesh shahre
By: Mhalsakant School
Category: Art
cleari()
setBackground(black)
invisible()
setSpeed(fast)
// ?????? ?? ????????? ??? ????? ????? ?????, ?????? ???? ?? ????? ?????? ???? ????

    penUp()
    
    penDown()
    
    val colors = Seq(red, green, blue, yellow, cyan, magenta, orange, pink)
    
    // ??? ???????? ?????? ?? ????? ??????? ????? (Geometric Pattern) ????
    for (i <- 1 to 36) {
        val randomColor = colors(scala.util.Random.nextInt(colors.length))
        setPenColor(randomColor)
        setPenThickness(2)
        
        forward(50)
        right 
        right 
        forward(50)
        right(10)
    }