From 88ef8d2115c871370088c4c0c773e12bfec5fc1d Mon Sep 17 00:00:00 2001 From: Dhanush Date: Sun, 2 Oct 2022 16:58:07 +0530 Subject: [PATCH] Create TakeABreak.py --- Python/Take a Break/TakeABreak.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Python/Take a Break/TakeABreak.py diff --git a/Python/Take a Break/TakeABreak.py b/Python/Take a Break/TakeABreak.py new file mode 100644 index 000000000..16f9c0837 --- /dev/null +++ b/Python/Take a Break/TakeABreak.py @@ -0,0 +1,11 @@ +#This program will take a break in your computer. +#For every two hours youtube.com will open in your browser for a period of 3 breaks +import webbrowser +import time +total_breaks = 3 +break_count = 0 +print("This program started on"+time.ctime()) +while(break_count < total_breaks): + time.sleep(2*60*60) + webbrowser.open("http://www.youtube.com") + break_count+=1;