Skip to content

Instantly share code, notes, and snippets.

@nibrahim
Created May 10, 2021 19:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nibrahim/4e80922324f70922b8c02b3b5a11dbab to your computer and use it in GitHub Desktop.
Save nibrahim/4e80922324f70922b8c02b3b5a11dbab to your computer and use it in GitHub Desktop.
Example program for genskill bootcamp
import time
l = 20
q = ['.']*l
i = 0
f = 1
while True:
i+=1
p = q[:]
m = q[:]
x = i%(l-2)
p[x], p[x-1], p[x+1], p[x-2], p[x+2] = ["0", "O", "O", 'o', "o"]
print ("".join(p), end="", flush=True)
time.sleep(0.05*f)
print ("\r", end="", flush=True)
if i%l == 0: f += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment