Comme le prouve le script, les 2 rectangles vont à la même vitesse, c’est uniquement la couleur du fond qui change !
🖥 Visiter ma chaine Youtube Maths-info
from kandinsky import fill_rect as fr from time import sleep COUL = ((3,30,220),(255,242,0)) def bandes(v): for c in range(32): g = v[c%2] fr(10*c,0,10,222,(g,g,g)) def rect(x,y,c): g = v[x//2%2] fr(5*x,10*y,5,20,(g,g,g)) fr(40+5*x,10*y,5,20,c) while True: for v in ((160,114),(255,0)): bandes(v) for x in range(64): rect(x,5,COUL[0]) rect(x,14,COUL[1]) sleep(.06)