Code Sketch


26 jan ag
By: Mulvery Convent School
Category: Art
cleari()
originBottomLeft()
setSpeed(superFast)
setBackgroundV(cm.darkOrange, cm.green)
def star(n: Int) {
repeat(5) {
forward(n)
right(720 / 5)
}
} //> def star(n: Int): Unit
setPenColor(cm.white)
setPenThickness(1)
repeat(200) {
setPosition(
random(0, cwidth),
random(cheight / 2, cheight)
)
star(10)
}
setPosition(0, 0)
setPenColor(black)
setFillColor(orange)
def build2 {
repeat(5){
val build=random(14,120)
        repeat(2){
        
        forward(build)
        right()
        forward(50)
        right()
    }
    right()
    hop(45)
    left()

}
} //> def build2: Unit
build2
setFillColor(white)
    build2
setFillColor(green)
build2
left(80)
hop(460)
right(80)
hop(140)
setPenColor(blue)
   setPenFont(Font("Cambria", 25))
write("Our constituion is a ray of 'HOPE'")
hop(-30)
write("H-Harmony O-Opportunity P-People's Participation E-Equality")
hop(-50)
setPenFont(Font("Cambria", 25))
write("HAPPY REPUBLIC DAY")