-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmagic.py
More file actions
52 lines (39 loc) · 1.17 KB
/
magic.py
File metadata and controls
52 lines (39 loc) · 1.17 KB
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
import time
global timesince
global oldtext
global newtext
global zzz
timesince = 0
oldtext = "old"
newtext = "new"
zzz = int(input('How many seconds between each check? '))
if (zzz < 20):
zzz = int(input("I can't go that fast! Try something greater than 19 "))
def main():
def alaina():
global newtext
global oldtext
def henry():
global timesince
global zzz
def magic():
global timesince
global newtext
global oldtext
global zzz
if (oldtext == newtext):
timesince += zzz
return(timesince)
else:
timesince += zzz
oldtext = newtext
timesince = 0
return(oldtext, timesince)
alaina()
magic()
if (timesince == 0):
henry()
while True:
time.sleep(zzz)
main()
# hey guys I really did try to merge our code but I guess i didn't understand nearly enough about how it would all work together. It seems as though the output wants some information we don't have and doesn't even need the information we do get. Maybe I'm seeing things wrong but I can't figure out how it would all work together.