From c5c15bcd1086090a25d51ca96295220fbe1ac9d2 Mon Sep 17 00:00:00 2001 From: San Jacobs Date: Tue, 5 Oct 2021 14:47:52 +0200 Subject: Comments and thoughts --- satscalc.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/satscalc.py b/satscalc.py index 9be885c..f118fbe 100755 --- a/satscalc.py +++ b/satscalc.py @@ -20,6 +20,7 @@ print("\nTime to add your hours of work.") def timeInput(prompt): while True: i = input(prompt) + # If empty, return empty string if i=="": return "" elif len(i)==4: break print("Wrong format. Try again.") @@ -43,12 +44,13 @@ while True: hours_worked = difference.total_seconds()/3600 # TODO: This part makes no sense. Don't worry. It'll be made to make sense. + # TODO: Apparently there is a rule that you always have to invoice for 4 hours or more on ad-shoots. Investigate. - input("Was this a weekend? [y/n]: ") + weekend = "y" in input("Was this a weekend? [y/n]: ").lower() if hours_worked > 8: print("Overtime detected.") - input("Was this overtime warned about before 12 o'clock the day before? [y/n]: ") + warned_overtime = "y" in input("Was this overtime warned about before 12 o'clock the day before? [y/n]: ").lower() -print("\nDifference:",difference) -print("Hours worked:",hours_worked) +print("\nDifference:", difference) +print("Hours worked:", hours_worked) -- cgit v1.2.1