from turtle import * from kandinsky import* from random import * fill_rect(0,0,400,400,color(0,127,255)) f=0 pensize(50) penup() goto(-160,-100) pendown() pencolor(67, 240, 200) goto(160,-100) while f<1: penup() goto(randint(-160,160),randint(-10,100)) pencolor(255, 255, 0) pendown() for i in range(5): pensize() circle(i) f=f+1 speed(20) hideturtle() angle=50 pencolor(165,42,42) def arbre(n,longueur): if n==0 : pencolor(0, 145, 48) forward(longueur) backward(longueur) pencolor(165,42,42) else: width(n) forward(longueur/3) left(angle) arbre(n-1,longueur*2/3) right(2*angle) arbre(n-1,longueur*2/3) left(angle) backward(longueur/3) hideturtle() pensize(0) penup();right(90); forward(200) left(200) pendown() goto(0,-120) setheading(90) arbre(11,200) penup() goto(100,100) pendown() showturtle() mainloop()