dot02.py

Created by vef03715

Created on February 04, 2021

871 Bytes


from kandinsky import *
from time import *

def dot02():
  a=[[(0,0,0) for j in range(15)] for i in range(40)]

  str1=input("4chr=")
  draw_string(str1,0,0)

  for x in range(0,40):
    for y in range(0,15):
      a[x][y]=get_pixel(x,y)
      if a[x][y]!=color('white'):
        set_pixel(x,y,'white')
      else:
        set_pixel(x,y,'black')

  str2=str(str1)

  for z in range(0,4):
    str3=str2[z]

    for x in range(0,40):
      for y in range(0,15):
        if a[x][y]!=color('white'):
          draw_string(" ",x*8,(y+1)*14,color('black'))
        else:
          draw_string(str3,x*8,(y+1)*14,color('red'))

    sleep(0.5)

    for x in range(0,40):
      for y in range(0,15):
        if a[x][y]!=color('white'):
          draw_string(str3,x*8,(y+1)*14,a[x][y])
        else:
          draw_string(" ",x*8,(y+1)*14,color('red'))

    sleep(0.5)