-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboolean.py
30 lines (29 loc) · 912 Bytes
/
boolean.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
"""
#Simple number printer
print("This section prints the numbers from 1 to 10.")
number = 0
while number < 10:
number += 1
print(number)
#Sum until zero
print("This section takes the numbers you enter, sum them up and give you the sum when you enter 0 as your number.")
number = 0
while True:
user_input = int(input("Enter a number: "))
if user_input != 0:
number = number + user_input
else:
print(number)
break
"""
# Productivity Alarm
import time
import webbrowser
music_video = str(input("Paste link to media that will autoplay in your webbrowser upon activation"))
total_breaks = int(input("How many times will the media run?"))
s = int(input("How often in seconds?"))
break_count = 0
while int(break_count) < total_breaks:
time.sleep(s)
webbrowser.open(music_video)
break_count += 1 #Instead of break_count = break_count + 1