-
Notifications
You must be signed in to change notification settings - Fork 0
/
crazy.py
34 lines (28 loc) · 910 Bytes
/
crazy.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
import sys
import time
def print_with_typewriter_effect(message, emoji, t):
for char in message:
sys.stdout.write(char)
sys.stdout.flush()
time.sleep(0.01) # Sleep for 0.1 seconds between characters for the typing effect
print(" " + emoji)
time.sleep(t)
def main():
sentences = [
"Crazy?",
"I Was Crazy Once.",
"They Locked Me In A Room.",
"A Rubber Room.",
"A Rubber Room With Rats.",
"And Rats Make Me Crazy.",
]
emojis = ["😜", "😵", "🔒", "🏥", "🐀", "🤡"]
for i in range(len(sentences)):
print_with_typewriter_effect(sentences[i], emojis[i], 2 if i == 0 else 1)
print('\n')
while True:
for i in range(len(sentences)):
print_with_typewriter_effect(sentences[i], emojis[i], 2 if i == 0 else 1)
print('\n')
if __name__ == "__main__":
main()