Tapez par exemple >>> go()
ou go(30)
, le nombre devant être entre 0 et 255
from kandinsky import * T = 1 def go(r = 182): lig = int(220 / T) col = int(320 / T) fill_rect(160,0,T,T,(0,0,0)) rb = "0" * 8 + bin(r)[2:] for y in range(lig): for x in range(1,col-1): n = 4 * ecran(x - 1,y) + 2 * ecran(x,y) + ecran(x + 1,y) if rb[-1 - n] == "1": fill_rect(T * x,T * (y + 1),T,T,(0,0,0)) def ecran(x,y): v = sum(get_pixel(T * x,T * y)) return 1 if v == 0 else 0