From e8db7c060ac1a24096b8b317e55f5f11152f252d Mon Sep 17 00:00:00 2001 From: Syed Mustafa Hassan <98483655+Mustafa-Hassan2001@users.noreply.github.com> Date: Tue, 27 Feb 2024 00:50:45 +0500 Subject: [PATCH] Create Simple_Counter_App.py --- Simple_Counter_App.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Simple_Counter_App.py diff --git a/Simple_Counter_App.py b/Simple_Counter_App.py new file mode 100644 index 000000000..44e3437d7 --- /dev/null +++ b/Simple_Counter_App.py @@ -0,0 +1,14 @@ +import datetime +user_input = input("Enter your goal with a deadline separatedby colon\n") +input_list = user_input.split(":") + +# goal = input_list[0] +deadline = input_list[0] + + +deadline_date = datetime.datetime.strptime(deadline, "%d.%m.%Y") +today_date = datetime.datetime.today() +time_till = deadline_date - today_date + +hours_till = int(time_till.total_seconds()/ 60/ 60) +print(f"Dear User! Time remanning for your goal : {goal} is {hours_till} hours")