https://twitter.com/nsi_xyz/status/1641897276326006786
from kandinsky import fill_rect from random import randint from turtle import * hideturtle() speed(10) def defi1(): fill_rect(40, 60, 240, 140, 'black') fill_rect(50, 70, 220, 120, 'white') hideturtle() pensize(5) speed(10) for angle in [135, 45]: penup() goto(0, 50) setheading(angle) pendown() forward(50) while True: coord_x = randint(50, 220) coord_y = randint(70, 120) longueur = randint(0, 220) largeur = randint(0, 120) couleur = (randint(0, 255), randint(0, 255), randint(0, 255)) if coord_x + longueur > 270 or coord_y + largeur > 190: continue fill_rect(coord_x, coord_y, longueur, largeur, couleur) def defi2(): pensize(11) circle(1) for i in range(0, 200, 10): color(i, i, i) penup(); goto(0, -i); pendown() circle(i) def defi3(): pensize(11) for i in range(0, 240, 10): color(i, i, i) penup(); goto(-160, 120 - i); pendown() forward(320) color('yellow') penup(); goto(-50, 50); pendown() setheading(-135) forward(100) setheading(0) forward(100) penup(); goto(-50, 0); pendown() setheading(-90) forward(50) penup(); goto(40, 50); pendown() setheading(0) forward(50) setheading(-90) forward(50) setheading(180) forward(50) setheading(-90) forward(50) setheading(0) forward(50)