Explication/aide direct live
from kandinsky import * import time def motif(x, y): # C'est là que l'on invente le motif fill_rect(x, y, 60, 10, color(0,255,0)) fill_rect(x+10, y-10, 40, 10, color(255,0,0)) fill_rect(x+20, y-20, 20, 10, color(0,0,255)) fill_rect(x+10, y+10, 40, 10, color(255,0,0)) fill_rect(x+20, y+20, 20, 10, color(0,0,255)) # Programme principal x = 0 y = 100 for i in range(1,320-x): # il faut effacer la trace précédente fill_rect(0,0,320,220,color(255,255,255)) # nouvelle trace motif(x+10*i, y) time.sleep(0.1)