cercle_avec_kandinsky.py

Created by elodie-gamot

Created on September 28, 2021

367 Bytes

Tracer un cercle avec kandinsky


from math import *
from kandinsky import *
from random import *

background=color(240,240,240)
surprise=color(randint(0,255),randint(0,255),randint(0,255))

fill_rect(0,0,320,222,background)

for i in range(320):
  for j in range(220):
    if (i-160)**2+(j-110)**2>1800 and (i-160)**2+(j-110)**2<2200:
      set_pixel(i,j,surprise)