eb2_2024.py

Created by cent20

Created on May 22, 2024

261 Bytes

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


from kandinsky import *
from random import *

message = (51,36,53,57,42,59,118,119,120)

for i in range(176):
    x = 16
    col = (8*randint(24,30),)*3
    if i in message:
      col = (42,)*3
    fill_rect(i % x *20,i // x * 20,20,20,col)