Code Sketch


Arun , pranjal
By: Mulvery Convent School
Category: Art
cleari()
clearOutput()
val name = readln("hello! What's your name")
val ans = s"Hello $name, HAPPY DIWALI TO YOU AND YOUR FAMILY"
println(ans)
setSpeed(superFast)
def pic2(){
    setSpeed(fast)
 setPenColor(black)
left(55)
setFillColor(Color(228, 176, 75))
hop(30)
left(120)
left(20,100)
right(180)
right(8,100)
left(120)
right(10,250)
left(80)
left(60,90)
left(30,3)
left(45,120)
left(90)
right(10,220)
left(120)
right(8,100)
right(180)
left(25,100)
right(240)
hop(90)
left(150)
setFillColor(color(228, 176, 75))
right(100,30)
right(180)
left(40,30)
right(90)
right(60,30)
right(169)
hop(94)
left(40)
left(40,70)
right(180)
right(27,70)
right(120)
setFillColor(Color(255, 232, 7))
left(60,90)
right(80)
left(40,50)
right(30,30)
left(170)
right(30,30)
left(40,50)
right(85)
left(64,90)
right(120)
right(27,70)
right(180)
left(40,70)
left(97)
right(45,120)
right(30,3)
right(60,90)
right(155)
hop(95)
right(25)
setFillColor(color(228, 176, 75).fadeOut(0))
right(40,40)
right(138)
right(40,40)
left(75)
hop(99)
left(90)
left(10,120)
left(40,40)
right(180)
right(30,40)
left(160)
left(25,120)
right(7,200)
left(30,50)
left(20,100)
left(50)
left(30,50)
left(50)
left(30,120)
right(60,10)
left(40,40)
left(20)
right(20,50)
right(180)
left(70,50)
right(180)
right(20,50)
left(130)
left(30,100)
right(30,80)
left(85)
left(30,250)
left(50)
left(60,30)
right(60)
left(50,50)
right(70)
left(50,55)
right(180)
right(10,55)
left(20)
left(30,90)
right(40,10)
left(30,90)
left(50)
left(40,40)
left(60)
left(37,200)
right(180)
right(5,200)
left(160)
left(53,60)
left(148)
right(25,70)
right(180)
left(25,70)
left(122)
right(64,90)
left(85)
right(40,50)
left(30,30)
right(170)
left(30,30)
right(40,50)
left(80)
right(60,90)
left(155)
hop(162)
setFillColor(Color(255, 232, 7))
left(95)
left(30,50)
right(180,5)
right(38,50)
right(180,4)
left(16.4)
hop(253)
left(40,40)
right(180,5)
right(50,40)
right(180,3.5)
right(154)
hop(58)
right(30,250)
left(70)
left(30,30)
left(64)
left(20,30)
repeat(12){
left(360,8)
left(2,300)
}
left(70)
forward(5)
left(20,30)
left(73.5)
hop(194)
setFillColor(Color(228, 176, 75))
left(40)
left(20,50)
left(25)
repeatFor(rangeTo(1,4)){counter=>
    left(1+3*counter,50)
    left(180,2)
    right(1+3*counter,50)
    right(180)
}
left(7,50)
right(190)
right(110,5)
left(130)
right(30,10)
right(170)
left(40,18)
left(130,2)
left(26,50)
left(100)
right(25,50)
left(120)
setFillColor(Color(51, 51, 51).fadeOut(0))
hop(18)
left(10)
forward(20)
left()
forward(8)
left()
forward(10)
left(130)
right(130,2)
right(25,18)
left(50)
left(70,5)
left(80)
hop(22)
setFillColor(color(204, 204, 255))
right(85)
forward(7)
left(92)
forward(180)
left(20)
forward(30)
left(130)
forward(30)
left(31)
forward(182)
left(88)
forward(22)
setFillColor(Color(255, 232, 7))
left(92)
forward(5)
left(20)
forward(30)
left(135)
forward(27)
left(31)
forward(8)
left(82)
forward(21)
right(100)
hop(37)
left(10)
setFillColor(color(51, 51, 51))
forward(20)
left(45)
right(165,9)
right(75)
left(14,100)
right(125)
left(170,4)
left(5,30)
left(9.5)
hop(255)
setFillColor(Color(228, 176, 75))
right(100)
left(40,25)
right(30,20)
left(190,3.5)
right(20,40)
right(100)
right(20,30)
right(90,2)
repeatFor(rangeTo(1,4)){counter=>
    left(12-1*counter,60)
    left(180,2)
    right(12-1*counter,60)
    right(180)
}
right(180)
left(10,60)
left(80,7)
right(10.7,130)
left(80)
right(35,40)
left(13.5)
hop(194)
setFillColor(blue)
left(55)
left(30,75)
left(31)
forward(137)
right(31)
forward(32)
right(130)
forward(30)
right(20.5)
forward(110)
left(150)
left(20,150)
right(30,50)
left(130,4)
left(20,75)
right(110)
forward(35)
left(20.5)
forward(30)
left(130)
forward(32)
left(32)
forward(43)
right(72)
left(30,75)
right(20,80)
left(50)
right(15,85)
right(180)
left(40,85)
right(20,50)
left(35,90)
left(130,4)
right(30,50)
left(40,60)
right(30,40)
left(23,110)
left(88)
right(26,300)
left(75)
left(30,75)
left(31)
forward(92)
right(76)
hop(47)
setFillColor(color(228, 176, 75))
left(40)
left(20,240)
left(70,3)
left(20,60)
left(65,3)
left(20,190)
left(20)
forward(33)
left(110)
right(20,60)
left(170)
hop(103)
right(120)
left(20,340)
left(70,3)
left(20,60)
left(65,3)
left(20,270)
left(140)
right(90,5)
right(10,200)
right(180)
setFillColor(color(228, 176, 75).fadeOut(1))
left(10,200)
left(90,5)
left(40)
left(20)
hop(30)
left(60)
repeatFor(rangeTo(1,3)){counter=>
    right(50+20*counter,30)
    right(90)
    hop(30)
    left(150+20*counter)
}
right(50,30)
left(70)
hop(80)
left(120)
repeatFor(rangeTo(1,3)){counter=>
    left(10+20*counter,30)
    left(120)
    hop(40)
    right(150+20*counter)
}
right(17.5)
hop(223)
right(50)
setFillColor(color(243, 213, 53))
def sho(){
left(15,100)
right(40,10)
right(25,40)
right(210,7)
left(160)
left(170,9)
left(10,50)
left(60,10)
left(15,150)
right(20,50)
left(90,10)
left(20,60)
left(100)
right(30,50)
}
sho()
right(173)
hop(90)
right(147)
sho()
}
//
def pic(){
invisible()
setBackground(black)
val cb = canvasBounds
val clr1 = cm.radialGradient(
0, 0, orange,
cb.width / 5, black,
false
)
setBackground(clr1)
setPenColor(black)
setFillColor(Color(243, 194, 92).fadeOut(0))
left(80)
right(15,50)
right(50,30)
right(30,8)
left(50,20)
right(50,2)
left(250,5)
right(40,10)
right(180)
left(40,10)
right(250,5)
left(50,2)
right(20,20)
right(160,6)
left(20,30)
repeat(2){
right(40)
right(20,30)
}
left(90)
right(80,30)
right(150)
left(80,15)
left(160)
right(80,15)
right(10)
right(60,50)
right(40)
right(40,130)
right(30)
right(30,50)
right(20)
right(20,40)
hop(25)
left(100)
left(30,50)
right(180)
right(10,50)
left(90)
left(20,70)
right(60,12)
left(20)
left(40,90)
right(30,20)
left(40,20)
left(90,3)
left(12,50)
left(20,80)
left(15,10)
left(20,200)
right(40,20)
right(10,50)
left(30,3)
repeatFor(rangeTo(1,3)) { counter =>
    left(10+3*counter,60)
    left(180,3)
    right(10+3*counter,60)
    right(180)
}
left(16,60)
left(180,3)
right(20,70)
right(180)
left(15,70)
left(90)
left(90,7)
right(8,70)
left(40,20)
right(10,40)
right(40,20)
right(15,190)
right(180)
left(15,190)
left(40,20)
left(10,40)
right(40,20)
left(8,70)
right(90,7)
right(90)
right(15,70)
right(180)
left(20,70)
right(180,3)
right(16,60)
repeatFor(rangeTo(1,3)) { counter =>
    right(180)
    left(22-3*counter,60)
    right(180,3)
    right(22-3*counter,60)
}
right(30,3)
left(10,50)
left(40,20)
right(10,200)
left(160)
right(20,80)
right(60,20)
left(15,280)
left(70)
left(20,300)
left(90)
right(20,250)
right(60,30)
right(40)
left(50,80)
right(180)
right(10,80)
right(210)
left(40,60)
right(30)
left(15,100)
left(120)
right(60,10)
right(180)
left(120,10)
left(20,60)
left(70)
forward(6)
left(30)
left(60,10)
right(180)
right(60,10)
left(150)
forward(12)
left(70)
right(35,13)
right(180)
left(50,20)
left(150,3)
left(18,50)
left(50,15)
right(50,20)
right(10,250)
left(70,5)
right(80,5)
left(60,80)
right(180)
right(10,80)
left(120)
left(50,60)
left(70)
right(30,20)
right(180)
left(50,34)
left(105)
right(15,50)
right(18)
right(20,40)
left(13)
right(15,50)
right(25,30)
right(60)
hop(80)
right(155)
left(15,50)
left(180,4)
right(12,50)
left(140)
hop(40)
right(220)
setFillColor(white)
right(10,50)
right(20,3)
right(10,80)
right(136)
right(50,26)
right(10)
hop(7)
setFillColor(Color(243, 194, 92))
right(115)
right(50,25)
left(30,15)
right(30)
hop(10)
right(50)
left(15,60)
right(160,3)
left(100)
right(200,3)
left(30-2)
hop(18)
right(50)
right(30,20)
right(160)
hop(30)
setFillColor(black)
right(360,1.2)
hop(0)
left(40)
hop(80)
setFillColor(black)
right(100)
right(50,30)
left(30,20)
right(60,70)
right(30,5)
left(80,20)
right(20,30)
right(80,10)
right(10,80)
right(80,8)
left(20,30)
left(80,20)
right(30)
right(60,30)
right(160)
left(50,30)
right(50)
left(2,130)
left(32)
left(60,50)
left(10)
left(80,15)
right(162)
right(79,15)
left(150)
left(83,30)
right(90)
repeat(2){
left(20,30)
left(40)
}
right(20,30)
left(160,6)
left(20,20)
right(50,2)
left(250,5)
right(40,10)
left(180)
left(40,10)
right(250,5)
left(50,2)
right(50,20)
left(30,8)
left(24,30)
right(57)
left(21,50)
right(90)
left(16,70)
left(68)
hop(100)
setFillColor(color(243, 121, 0).fadeOut(0))
left(150)
right(20,100)
right(50,10)
left(30)
left(50,50)
right(40,20)
left(10)
left(62,30)
right(97)
right(38,60)
right(60)
right(40,30)
left(20,80)
left(60,10)
right(60)
right(50,50)
left(60,20)
left(20,50)
right(60,30)
right(40)
right(7,300)
right(72)
right(10,280)
right(63)
hop(140)
right(110)
right(50,30)
left(30,45)
right(170)
right(4.2,280)
right(60,30)
right(160)
hop(150)
def ln(){
right(180)
left(30,60)
}
ln()
left(120)
hop(25)
left(30)
ln()
right(45)
hop(30)
left(190)
ln()
hop(20)
left(160)
ln()
left(32)
hop(79)
right(135)
setFillColor(white)
left(34,20)
left(90)
forward(4)
right(119)
hop(209)
setFillColor(Color(135, 107, 59).fadeOut(0))
right(53)
forward(30)
left()
forward(12)
left()
forward(32)
left(160)
right(80,4)
right(15,25)
right(60)
hop(10)
right(5)
forward(19)
right()
forward(12)
right()
forward(30)
right(180)
left(50,4)
left(15,60)
right(102)
hop(24)
setFillColor(Color(102, 51, 0))
left(35)
forward(10)
right(50)
left(120,70)
right(130,20)
left(160)
left(150,24)
right(120,60)
left(45)
forward(20)
left(18)
hop(60)
right(10)
forward(10)
left(50)
right(120,70)
left(130,20)
right(160)
right(150,24)
left(120,60)
right(45)
forward(19)
left(101.5)
hop(208)
left(65)
forward(10)
right()
setFillColor(Color(235, 165, 30))
repeat(14){
    right(1.5,280)
    right(50)
    right(30,20)
    right(180)
    left(30,20)
    right(129.5)
}
right(50)
right(35,20)
right(98)
left(20,300)
left(59)
hop(318)
right(145)
setPenColor(white)
forward(338)
right(170)
hop(158)
left(70)
setFillColor(Color(121, 88, 23))
setPenThickness(0.5)
repeat(3){
right(360+180,2)
left(360+180,2)
}

left(3.5)
hop(250)
right(180)
repeat(3){
left(360+180,2)
right(360+180,2)
}
left(28)
hop(90)
right(10)
setPenColor(black)
setPenThickness(2)
right(50,20)
//invisible()
left(148)
hop(104)
right(120-90)
repeat(3){
right(360+180,3.5)
left(360+180,4)
}
left(165)
hop(61)
setFillColor(white)
setPenThickness(3)
right(360,2)
left(58)
hop(346)
left(150+180)
hop(-3)
}
//
setSpeed(superFast)
def pic3(){
    setSpeed(superFast)
def pic() {
  
setPenThickness(1)
setPenColor(black)
setBackground(black)
setFillColor(Color(228, 176, 75))
left(60)
right(10,200)
right(20)
right(30,80)
left(110)
right(25,15)
right(120,5)
left(65)
right(30,30)
right(170,6)
left(10,90)
left(10)
left(10,140)
right(180)
right(10,140)
right(10)
right(10,140)
right(15,40)
right(70)
left(30,50)
right(120,20)
left(150)
right(120,20)
left(30,50)
right(70)
right(15,40)
right(10,140)
right(10)
right(10,140)
right(180)
left(10,140)
left(10)
left(10,90)
right(170,6)
right(30,30)
left(65)
right(120,5)
right(25,15)
left(110)
right(30,80)
right(20)
right(10,200)
right(45)
left(30,45)
right(81)
hop(110)
setFillColor(color(245, 255, 0))
right(20)
right(188,56.5)
right(102)
right(30,50)
left(120,20)
right(150)
left(120,20)
right(30,50)
right(100)
setFillColor(color(255, 232, 7))
right(10,56.5)
right(70)
left(30,50)
right(120,20)
left(150)
right(120,20)
left(30,50)
right(70)
right(10,56.5)
right(100)
right(30,50)
left(120,20)
right(150)
left(120,20)
right(30,50)
right(100)
setFillColor(white.fadeOut(1))
right(20,55.5)
right(28)
right(90,75)
right(155)
hop(57)
left(106)
setFillColor(color(46, 99, 231))
repeat(2){
left(180,4)
forward(5)
}
right(155)
hop(21)
right(30)
setFillColor(color(255, 232, 7))
right(20,50)
right(20)
left(30,20)
right(145)
left(30,20)
right(20)
right(20,51)
right(39)
hop(120)
right(40)
right(20,25)
left(220,4)
left(10,45)
right(47)
hop(103)
right(40)
right(20,25)
left(220,4)
left(10,45)
right(27)
hop(88)
right(175)
def v(){
    forward(20)
    left(60)
    forward(20)
    right(180)
    forward(20)
    right(60)
    forward(20)
}
repeat(3){
    v()
    left(120)
    hop(5)
    left(60)
}
left(50)
hop(18)
setFillColor(red)
right(140)
left(20,25)
left(200,3)
left(20,25)
left(130)
hop(25)
right(70)
setFillColor(white)
right(20,20)
left(45,35)
left(160)
right(23,30)
left(45,30)
right(25)
hop(10)
left(20,20)
right(45,35)
right(160)
left(23,30)
right(45,30)
left(32)
hop(10)
right(6)
right(20,20)
left(10,35)
setFillColor(black)
left(10,35)
left(70)
left(210,4)
right(98)
hop(42)
right(70)
right(213,4)
right(66)
right(15,35)
right(180)
hop(30)
setPenColor(black)
setFillColor(white.fadeOut(1))
setPenThickness(3)
right(20,20)
left(45,35)
right(205)
hop(40)
left(5)
left(20,20)
right(45,35)
right(150)
setPenThickness(1)
hop(38)
left(80)
right(10,120)
right(185)
hop(22)
right(165)
left(10,120)
left(140)
hop(6)
right(107)
right(130,4)
left(50)
right(100,5)
left(50)
setFillColor(black)
right(130,4)
right(180)
hop(25)
left(40)
left(150,2)
right(10,50)
right(50,10)
right(5,150)
right(50,10)
left(10,50)
left(150,2)
right(150)
right(190,3)
left(15)
right(10,50)
left(50,10)
right(5,100)
left(50,10)
left(10,50)
right(15)
right(135,3)
right(65)
hop(11)
right(100)
left(10,70)
left(70,5)
left(5,100)
left(70,5)
right(5,128)
left(63)
left(50,10)
right(3)
right(5,100)
left(50,10)
left(80)
setFillColor(white)
forward(5)
left(140)
forward(4)
right(178)
forward(2)
left(90,1)
forward(1)
left(90,1)
forward(4)
right(180)
repeat(4){
    forward(3)
    left(90,1)
    forward(1.5)
    left(90,1)
    forward(3)
    right(180)
}
forward(5)
left(130)
forward(5.5)
right(182)
hop(24)
right(140)
forward(5)
right(150)
forward(5)
right(195)
repeat(3){
    forward(3)
    right(90,1)
    forward(1.5)
    right(90,1)
    forward(3)
    right(180)
}
forward(5.5)
right(140)
forward(4.5)
right(67)
right(70,5)
left(10)
setFillColor(red)
right(5,100)
right(20,5)
right(135)
hop(18)
left(100)
left(110,6)
right(20,13)
right(180)
left(20,10)
left(50)
left(120,6)
left(60)
left(10,50)
left(20)
left(10,6)
left(110)
forward(5)
right(150)
forward(5)
right(195)
repeat(3){
    forward(3)
    right(90,1)
    forward(1.5)
    right(90,1)
    forward(3)
    right(180)
}
forward(5.5)
right(140)
forward(4.5)
left(125)
left(5,55)
right(6)
hop(40)
setPenColor(white)
setPenThickness(2)
right(360,0.6)
left(108)
hop(42)
right(360,0.6)
left(99)
hop(82)
right(190)
}
repeat(10){
    pic()
    right(89.6)
    hop(128)
    left(90)
}
setPenThickness(1)
left(77)
hop(123.3*6)
right(120)
left(30,100)
right(170)
right(20,188)
right(138)
left(20,56.5)
left(48)
hop(85)
right(60)
right(30,100)
left(174)
left(20,188)
left(142)
right(18,56.5)


}
//
def pic4(){
    setSpeed(fast)
setFillColor(color(132, 83, 14))
right(60)
repeat(2){
forward(150)
right(90)
forward(8)
right()
}
hop(25)
setFillColor(white)
left(120)
forward(20)
repeat(4){
left(60)
forward(5)
left(120)
repeatFor(rangeTo(1,6)) { counter =>
    setPenThickness(2-0.3*counter)
    forward(3)
}

right(180)
repeatFor(rangeTo(1,6)) { counter =>
    setPenThickness(0.2+0.3*counter)
    forward(3)
}
}
right(180)
forward(20)
left(60)
forward(20)
right(90)
hop(8)

right(30)
forward(20)
repeat(4){
right(60)
forward(5)
right(120)
repeatFor(rangeTo(1,6)) { counter =>
    setPenThickness(2-0.3*counter)
    forward(3)
}
right(180)
repeatFor(rangeTo(1,6)) { counter =>
    setPenThickness(0.2+0.3*counter)
    forward(3)
}
}
right(180)
forward(20)
right(60)
forward(20)
hop(125)
setFillColor(Color(97, 97, 97))
right(120)
forward(20)
left(140)
forward(50)
left(130)
forward(50)
left(140)
forward(20)
right(45)
forward(8)
right(180)
hop(5)
right(180)
left(110)
forward(38)
}
visible()
pic()
left(105)
hop(400)
left(40)
pic4()
left(10)
hop(400)
left(0)
left(80)
pic2()
right(29)
hop(750)
right(53)
pic3()
val cb = canvasBounds
val clr1 = cm.radialGradient(
0, 0, orange,
cb.width / 5, black,
false
)
setBackground(clr1)

visible()
setPosition(0, 0)
right(170)
hop(500)
right(153)
setPenColor(yellow)
setPenFontSize(100)
write("THE VICTORY OF GOOD OVER EVIL")
hop(900)
setPenColor(white)
write("MERE GHAR RAM AYE HAI")
hop(100)
write("HAPPY DIWALI")