eb2_2023.py

Created by cent20

Created on March 16, 2024

291 Bytes

Script de l’épreuve commune d’avril 2023. Les élèves doivent saisir le script, l’exécuter, expliquer ce qui s’affiche à l’écran.


from kandinsky import *
from random import *

for x in range(320):
  for y in range(222):
    c = 255 
    d = (x-160)**2 + (y-111)** 2   
    if d > (100-randint(0,42))** 2:
      c = 255*3000/d
    set_pixel(x,y,(c, c, c))
   
draw_string(chr(78)+chr(83)+chr(73), 145, 101)