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)

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>.