from kandinsky import * from time import * def draw_ghost(x,y): #SMALL GHOST black = color(0,0,0) fill_rect(x+11,y+138,8,9,black) fill_rect(x+0,y+103,10,34,black) fill_rect(x+9,y+93,10,10,black) fill_rect(x+19,y+83,35,10,black) fill_rect(x+54,y+93,10,10,black) fill_rect(x+64,y+101,10,37,black) fill_rect(x+54,y+138,10,10,black) fill_rect(x+74,y+138,10,10,black) fill_rect(x+29,y+148,46,9,black) fill_rect(x+28,y+125,10,10,black) fill_rect(x+19,y+103,10,19,black) fill_rect(x+37,y+103,10,19,black) #FLAME yellow = color(250,250,0) orange = color(250,70,0) fill_rect(x+2,y+157,26,16,orange) fill_rect(x+2,y+137,9,20,yellow) fill_rect(x+11,y+125,8,14,yellow) fill_rect(x+19,y+137,9,20,yellow) #BIG GHOST fill_rect(x+91,y+102,19,18,black) fill_rect(x+110,y+102,9,9,black) fill_rect(x+100,y+46,9,56,black) fill_rect(x+109,y+37,8,16,black) fill_rect(x+117,y+20,10,10,black) fill_rect(x+127,y+10,20,10,black) fill_rect(x+147,y+0,45,10,black) fill_rect(x+192,y+10,20,10,black) fill_rect(x+212,y+20,10,10,black) fill_rect(x+222,y+30,10,18,black) fill_rect(x+232,y+48,10,63,black) fill_rect(x+238,y+111,10,10,black) fill_rect(x+248,y+121,10,10,black) fill_rect(x+238,y+131,10,10,black) fill_rect(x+174,y+137,64,10,black) fill_rect(x+146,y+127,28,10,black) fill_rect(x+128,y+120,28,7,black) fill_rect(x+119,y+111,9,9,black) fill_rect(x+128,y+47,19,27,black) fill_rect(x+117,y+56,19,27,black) fill_rect(x+146,y+93,19,18,black) fill_rect(x+165,y+47,19,27,black) fill_rect(x+174,y+56,19,27,black) fill_rect(x+201,y+111,10,10,black) fill_rect(x+192,y+121,10,10,black) fill_rect(x+183,y+102,9,19,black) fill_rect(x+192,y+93,19,9,black) #FLAME fill_rect(x+110,y+111,9,9,yellow) fill_rect(x+101,y+120,9,17,yellow) fill_rect(x+119,y+120,9,17,yellow) fill_rect(x+101,y+137,27,10,orange) fill_rect(x+91,y+147,47,10,orange) fill_rect(x+91,y+157,10,10,orange) fill_rect(x+109,y+157,10,7,orange) fill_rect(x+128,y+157,10,10,orange) fill_rect(x+101,y+164,27,10,orange) def draw(x,y): draw_ghost(x,y) white = color(255,255,255) sleep(1) fill_rect(0,0,320,220,white) for i in range(4): draw(30,30) draw(20,20) draw(40,20) draw_ghost(30,30)