aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSan Jacobs2021-10-05 14:47:52 +0200
committerSan Jacobs2021-10-05 14:47:52 +0200
commitc5c15bcd1086090a25d51ca96295220fbe1ac9d2 (patch)
tree4e007b94d2a83fa84233722c743131abff83e20f
parentfffad84d2813b6343f0c57aa59c04d5bb866a52f (diff)
downloadsatscalc-c5c15bcd1086090a25d51ca96295220fbe1ac9d2.tar.gz
satscalc-c5c15bcd1086090a25d51ca96295220fbe1ac9d2.tar.bz2
satscalc-c5c15bcd1086090a25d51ca96295220fbe1ac9d2.zip
Comments and thoughts
-rwxr-xr-xsatscalc.py10
1 files 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)