-
Notifications
You must be signed in to change notification settings - Fork 0
/
Text Cascade.py
45 lines (36 loc) · 1.04 KB
/
Text Cascade.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import os, string, time
printing = ""
printin = ""
i = 0
def cc():
os.system('cls' if os.name == 'nt'
else 'clear')
cc()
toprint = str(input("Gimme something to print!: "))
for i in range(len(toprint)):
chartoget = toprint[i]
#print(f"INDEX: {i} CHARTOGET: {chartoget}")
if chartoget == " ":
printin = f"{printin} "
time.sleep(0.05)
cc()
print(printin)
continue
elif chartoget.islower(): charset = string.ascii_lowercase
elif chartoget.isupper(): charset = string.ascii_uppercase
else: charset = "0123456789,.!?@#$%^&*"
for u in range(len(charset)):
time.sleep(0.05)
cc()
var = charset[u]
printing = f"{printin}{var}"
print(printing)
#print(u+1)
#print(len(charset))
if var == chartoget:
printin = printing
break
elif u+1 == len(charset):
printin = f"{printin}?"
break
#print(f"LINE TO GET: {toprint}")