matrix.py

Created by golem64

Created on December 15, 2020

554 Bytes

Affichage d’une matrice qui défile lentement


from random import *
from kandinsky import *
from time import *
from ion import *
bits=[]
row=""
def printRandomBits():
  row=""
  for i in range(32): row+=str(randint(0,1))
  bits.append(row)
for j in range(16):
  printRandomBits()
y=0
while True:
  if y==0:
    printRandomBits()
  if len(bits)>16: bits.pop(0)
  for i in range(len(bits)): draw_string(bits[i],0,i*15-y,'green','black')
# Pour aller plus lentement et pouvoir accelerer avec la touche 'haut':
#  if not keydown(KEY_UP): sleep(0.05)
  y+=1
  if y==15: y=0
#omega=(200,49,69)