From 81cfc9b05d4b0075009189fa6da2b0922a005230 Mon Sep 17 00:00:00 2001 From: Benson Date: Sun, 15 Sep 2019 17:52:54 -0400 Subject: [PATCH 1/2] Generated inital timer code --- 52/bigarabuza/pomodorotimer.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 52/bigarabuza/pomodorotimer.py diff --git a/52/bigarabuza/pomodorotimer.py b/52/bigarabuza/pomodorotimer.py new file mode 100644 index 000000000..430faee89 --- /dev/null +++ b/52/bigarabuza/pomodorotimer.py @@ -0,0 +1,11 @@ +from datetime import datetime +from datetime import timedelta + +time_duration = int(input('Enter time duration:' )) +start_time = datetime.now() +end_time = start_time + timedelta(minutes=time_duration) + +while ((end_time - datetime.now())) >= timedelta(seconds=0): + print(str(end_time - datetime.now())) + +print('Time is up!') From 517d174d9baa76d076f7918275356bb103d10c3e Mon Sep 17 00:00:00 2001 From: Benson Date: Mon, 16 Sep 2019 05:13:22 -0400 Subject: [PATCH 2/2] Updated notification to user --- 52/bigarabuza/pomodorotimer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/52/bigarabuza/pomodorotimer.py b/52/bigarabuza/pomodorotimer.py index 430faee89..718b91694 100644 --- a/52/bigarabuza/pomodorotimer.py +++ b/52/bigarabuza/pomodorotimer.py @@ -8,4 +8,4 @@ while ((end_time - datetime.now())) >= timedelta(seconds=0): print(str(end_time - datetime.now())) -print('Time is up!') +print('Alarm!')