Skip to content

Commit e0f9b7f

Browse files
authored
Merge pull request #873 from DhanushNehru/main
Created TakeABreak.py
2 parents 813c6c3 + a4c5bd5 commit e0f9b7f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

take_a_break/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Using take a break script
2+
3+
### This program will take a break in your computer.
4+
### For every two hours youtube.com will open in your browser for a period of 3 breaks

take_a_break/TakeABreak.py

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import webbrowser
2+
import time
3+
4+
total_breaks = int(3)
5+
break_count = int(0)
6+
7+
print("This program started on" + time.ctime())
8+
9+
while break_count < total_breaks:
10+
time.sleep(int(2) * int(60) * int(60))
11+
webbrowser.open("http://www.youtube.com")
12+
break_count += int(1)

0 commit comments

Comments
 (0)