Tenir la calculatrice en mode paysage
from random import * from kandinsky import * NR, VE = (0,0,0), (0,255,0) lignes = [' ' * 32] * 32 tete = [0] * 32 def mat(): while True: for n in range(32): if random()>.9: p = .8 if lignes[n][-1:] != " " else .1 lignes[n] += chr(randint(32, 47)) if random() < p else " " lignes[n] = lignes[n][-32:] draw_string(lignes[n], 0, 7 * n, VE, NR) tete[n] = (tete[n] - 1) % 32 draw_string(lignes[n % 16][tete[n]], 8 * tete[n], 7 * n, NR, (0,80,0)) mat()