the function s(x) with x int in [0;2] make a bunch of random stuff
from random import randint,choice from turtle import * from kandinsky import fill_rect from time import sleep def s(x): c=["blue","red","green","yellow","brown","cyan","black","pink","orange","gray","purple"] a=0 speed(10) pensize(2) if x==0: while 1: a=(a+1)%100 color(choice(c)) left(randint(0,360)) forward(randint(5,20)) if a==99:goto(0,0) elif x==1: while 1: goto(randint(-160,160),randint(-111,111)) color(choice(c)) elif x==2: x,y=159,111 while 1: a=randint(0,3) if a==0 and x>1:x,b=x-2,0 if a==1 and x<319:x,b=x+2,1 if a==2 and y>1:y,b=y-2,2 if a==3 and y<221:y,b=y+2,3 fill_rect(x-1,y-1,2,2,choice(c)) # sleep(0.001)