from kandinsky import * from time import sleep height = 222 width = 320 # Draw the sky skyHeight = 202 def drawSkyUntil(s): for i in range(0, s): by = i/skyHeight r = 0+int(by*50) g = 0+int(by*90) b = 45+int(by*105) fill_rect(0,i, width, 1, color(r,g,b)) drawSkyUntil(skyHeight) # Draw water blue = color(0,0,40) fill_rect(0,195,320,27,blue) # Draw base brown2 = color(40,20,10) fill_rect(40,192,240,13,brown2) yellow = color(220,140,40) fill_rect(46,197,4,3,yellow) fill_rect(97,197,4,3,yellow) fill_rect(145,197,4,3,yellow) fill_rect(206,197,4,3,yellow) fill_rect(270,197,4,3,yellow) fill_rect(130,181,63,3,yellow) fill_rect(148,173,28,4,yellow) fill_rect(149,161,26,3,yellow) fill_rect(153,140,18,1,yellow) fill_rect(153,135,18,1,yellow) fill_rect(153,71,3,4,yellow) orange = color(180,90,10) fill_rect(93,184,13,13,orange) fill_rect(132,184,28,13,orange) fill_rect(194,184,22,13,orange) fill_rect(130,177,63,4,orange) fill_rect(148,168,28,5,orange) fill_rect(151,144,22,17,orange) fill_rect(150,141,24,2,orange) fill_rect(153,136,18,2,orange) brown = color(60,30,15) fill_rect(106,184,26,13,brown) fill_rect(160,184,34,13,brown) fill_rect(216,184,15,13,brown) fill_rect(149,164,26,4,brown) fill_rect(150,155,24,2,brown) fill_rect(153,146,2,7,brown) fill_rect(157,146,2,7,brown) fill_rect(161,146,2,7,brown) fill_rect(165,146,2,7,brown) fill_rect(169,146,2,7,brown) fill_rect(150,143,24,1,brown) fill_rect(153,138,18,2,brown) # Draw Statue of Libery green = color(190,215,110) fill_rect(156,94,13,41,green) fill_rect(170,104,3,3,green) fill_rect(172,101,3,3,green) fill_rect(154,85,2,16,green) fill_rect(153,77,2,8,green) fill_rect(159,85,2,8,green) fill_rect(162,85,2,4,green) fill_rect(165,85,2,9,green) kaki = color(80,90,55) fill_rect(157,132,2,3,kaki) fill_rect(160,128,2,7,kaki) fill_rect(163,122,3,13,kaki) fill_rect(167,120,3,15,kaki) fill_rect(157,132,2,3,kaki) fill_rect(157,121,2,5,kaki) fill_rect(157,132,2,3,kaki) fill_rect(159,119,2,3,kaki) fill_rect(161,117,2,3,kaki) fill_rect(163,115,2,3,kaki) fill_rect(165,111,2,11,kaki) fill_rect(168,108,2,11,kaki) fill_rect(170,107,3,5,kaki) fill_rect(173,104,2,5,kaki) fill_rect(175,101,2,3,kaki) fill_rect(165,103,5,5,kaki) fill_rect(160,110,2,3,kaki) fill_rect(156,114,2,3,kaki) fill_rect(158,112,2,3,kaki) fill_rect(162,108,2,3,kaki) fill_rect(156,106,2,3,kaki) fill_rect(158,104,2,3,kaki) fill_rect(160,102,2,3,kaki) fill_rect(162,100,2,3,kaki) fill_rect(156,93,4,8,kaki) fill_rect(160,96,3,3,kaki) fill_rect(163,95,3,3,kaki) fill_rect(156,85,2,8,kaki) fill_rect(155,77,2,8,kaki) fill_rect(151,75,7,2,kaki) fill_rect(160,89,5,5,kaki) # Draw the fireworks i = 0 while i < 10: s = 2 for p in [(135,35),(77,48),(186,57),(84,60),(218,31),(141,46),(147,10),(94,28), (97,18),(98,40),(245,18),(104,48),(105,28),(110,36),(257,26),(219,16),(120,46),(121,33),(185,21),(137,65)]: fill_rect(p[0],p[1],s,s,color(10,0,250)) for p in [(72,37),(136,19),(90,44),(147,28),(94,53),(150,56),(175,46),(158,66), (158,48),(239,51),(233,28),(162,6),(165,57),(250,44),(173,28),(150,38),(176,11),(182,35),(208,20)]: fill_rect(p[0],p[1],s,s,color(200,200,200)) for p in [(179,65),(82,23),(200,53),(196,43),(199,29),(211,45),(209,32),(125,57),(222,54),(85,53),(114,21),(229,39),(162,17),(233,14),(160,28),(99,63),(247,34),(167,38),(111,56)]: fill_rect(p[0],p[1],s,s,color(250,0,0)) sleep(1) drawSkyUntil(68) sleep(1) i = i+1