@zachsanford/

StupidPopcorn

Python

Playing around with \u0007

fork
loading
Files
  • main.py
main.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
46
47
48
49
50
51
from time import sleep as s

userQuit = False

userInput = input('Would you like to pop popcorn? (y/n) >> ')

while userQuit == False:
  if userInput == 'y':
    for i in range (100):
      print("\u0007")
      s(.025)

    for i in range (6):
      print("\u0007")
      s(.1)

    for i in range (5):
      print("\u0007")
      s(.25)

    for i in range (3):
      print("\u0007")
      s(.5)

    print("\u0007")
    s(1)
    print("\u0007")
    s(.3)
    print("\u0007")
    s(1.4)
    print("\u0007")
    s(.4)
    print("\u0007")
    s(.4)
    print("\u0007")
    s(2)
    print("\u0007")
    s(.5)
    print("\u0007")

    print('Popcorn is ready!')
    tryAgain = input('Would you like to go again? (y/n) >> ')

    if tryAgain == 'y':
      userQuit = False
    else:
      print('Goodbye.')
      userQuit = True
  else:
    print('Goodbye!')
    userQuit = True