from drawzero import* import random x = random.randint(0,100) y = random.randint(800,900) a = 100 b = 100 e = 0 f = 495 o = 0 k = 400 g = 100 m = 100 p = 300 h = random.randint(520,540) r = 30 color_d = ["#F0F8FF", "#E6E6FA", "#B0E0E6", "#B0C4DE"] color_k = ["#8FBC8F", "#90EE90", "#98FB98", "#7CFC00"] color_g = ["#FF8C00", "#FF0000", "#FF1493", "#9932CC"] color_g2 = ["purple","blue","red","green"] color_s = ["yellow", "white"] color_b = ["#D2B48C","#F5DEB3","#DEB887","#E9967A"] color_j = ["#D8BFD8","#9370DB","#DDA0DD","#BA55D3"] d = ["blue", "pink", "#FFE4E1", "#F0E68C"] t = ["green", "#2F4F4F", "#8FBC8F", "#006400"] filled_rect(d[random.randint(0,3)],(0,0),1000,500) filled_rect("#FFF0F5", (0,500), 1000,500) def dom1(x,y,a,b): filled_rect(color_d[random.randint(0,3)], (x,y), a,b) filled_rect("#483D8B", (x+a//4, y+b//4), a//2, b//2) rect("white", (x + a // 4, y + b // 4), a // 2, b // 2) line("white", (x+a//2, y+b//4), (x+a//2, y+3/4*b)) line("white", (x+a//4, y+b//2), (x+3/4*a, y+b//2)) filled_polygon(color_k[random.randint(0,3)], (x,y), (x+a//2, y-b//2), (x+a, y), (x,y)) polygon("white", (x, y), (x + a // 2, y - b // 2), (x + a, y), (x, y)) for i in range(7): filled_circle(color_g[random.randint(0,3)], (x,y), 5) x = x+15 def dom2(x,y,a,b): filled_rect(color_b[random.randint(0,3)], (x,y), a,b) filled_rect("#483D8B", (x+a//4, y+b//4), a//2, b//2) rect("white", (x + a // 4, y + b // 4), a // 2, b // 2) line("white", (x+a//2, y+b//4), (x+a//2, y+3/4*b)) line("white", (x+a//4, y+b//2), (x+3/4*a, y+b//2)) filled_polygon(color_j[random.randint(0,3)], (x,y), (x+a//2, y-b//2), (x+a, y), (x,y)) polygon("white", (x, y), (x + a // 2, y - b // 2), (x + a, y), (x, y)) for i in range(7): filled_circle(color_g2[random.randint(0,3)], (x,y), 5) x = x+15 def elka(e,f): filled_polygon(t[random.randint(0,3)], (e, f), (e+10, f-40), (e+20,f), (e,f)) filled_rect("brown", (e+4, f), 10,5) def snowman(r,h): filled_circle("#E0FFFF", (r,h), 5) circle("#87CEEB", (r, h), 5) filled_circle("#E0FFFF", (r, h+15), 10) circle("#87CEEB", (r, h + 15), 10) line("black", (r,h+15), (r,h+10)) filled_circle("#E0FFFF", (r, h+40), 20) circle("#87CEEB", (r, h + 40), 20) line("black", (r, h + 35), (r, h + 40)) for i in range(10): snowman(r,h) r = r+100 def sun(): filled_circle(color_s[random.randint(0,1)], (150,100),50) def draw_cloud(k,g): filled_circle("white", (k, g), 30, 0) filled_circle("white", (k+20, g-20), 30, 0) filled_circle("white", (k+40, g), 30, 0) filled_circle("white", (k+60, g), 30, 0) def draw_cloud2(m,p): filled_circle("#F0F8FF", (m, p), 30, 0) filled_circle("#F0F8FF", (m+20, p-20), 30, 0) filled_circle("#F0F8FF", (m+40, p), 30, 0) filled_circle("#F0F8FF", (m+60, p), 30, 0) for i in range(3): draw_cloud(k,g) k = k+200 g = g+50 for i in range(2): draw_cloud2(m,p) m = m+200 p = p-50 def girlanda(o): filled_circle(color_g[random.randint(0, 3)], (o ,505), 5) for i in range(8): dom1(x,y,a,b) dom2(x,y-180,a,b) x = x+110 for i in range(500): elka(e,f) e = e+20 for i in range(1): sun() for i in range(500): girlanda(o) for i in range(500): girlanda(o+10) for i in range(500): girlanda(o + 20) for i in range(500): girlanda(o+30) for i in range(500): girlanda(o+40) for i in range(500): girlanda(o+50) for i in range(500): girlanda(o+60) for i in range(500): girlanda(o+70) for i in range(500): girlanda(o+80) for i in range(500): girlanda(o) o = o+10 for i in range(400): filled_rect("white", (random.randint(0,1000), random.randint(0, 500)), (random.randint(3, 4), random.randint(3,4)))