Spécial 8 ans de NUMWORKS
import turtle from random import * from kandinsky import fill_rect v = 180 t = turtle rvb = [0,0,0] OR, BL = (254,178,63), (255,) * 3 def T(u,a1,a2,b1,b2): return (b2-b1)/(a2-a1)*(u-a1)+b1 while v >= 0: t.setheading(90 + v / 2) t.pensize(40 - v // 5) for i in range(3): rvb[i] = T(v, 0, 180, OR[i], BL[i]) t.color(rvb) t.circle(60) t.setheading(-90 + v / 2) t.circle(60) v -= 20 t.penup() t.color(BL) t.speed(5) while True: t.goto(0,0) r = randint(60,70) t.setheading(90) t.circle(r) t.setheading(90) t.circle(-r)