anim_matrix.py

Created by schraf

Created on August 01, 2020

513 Bytes

Attention, à cause de la boucle infinie, ce script ne fonctionnera que sur votre calculatrice et pas dans l’émulateur. Appuyez sur la touche “Retour” pour arrêter le programme.


from random import *
from kandinsky import *

NR = (0,0,0)

def mat(n):
  seed(n)
  for l in range(24):
    for c in range(32):
        draw_string(chr(48+randint(0,9)), 10*c, 12*l)
  for l in range(240):
    for c in range(320):
      v = get_pixel(c, l)
      coul = NR
      if v!=(248,252,248):
        coul = choice([NR, (16,88,38), (104,253,151)])
      set_pixel(c, l, coul)
  
  while True:
    c = randint(0,320)
    for l in range(240):
      set_pixel(c, 240-l, get_pixel(c, 200-l))

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our <a href="https://www.numworks.com/legal/cookies-policy/">cookies policy</a>.