Skip to content

Instantly share code, notes, and snippets.

@g-leech
Created June 4, 2021 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g-leech/4f4b7492bf0c1f34a3a0871c6877b386 to your computer and use it in GitHub Desktop.
Save g-leech/4f4b7492bf0c1f34a3a0871c6877b386 to your computer and use it in GitHub Desktop.
import numpy as np
niThresholdWeekly = 166
incomeTaxThresholdWeekly = 12500 / 52
# Claiming for Oct
deliveryHours = [4,4,2,2,2]
prepHours = [1,1,2,2,2]
nWeeks = len(deliveryHours)
hoursOver5Weeks = sum(deliv + prep for deliv, prep \
in zip(actualHours, prepTimes) )
payPerHour = 15.57
trainingHours = 5.5
totalPay = (hoursOver5Weeks + trainingHours) * payPerHour
holidayPay = 1.09
totalPay *= holidayPay
print("{} hours this month".format(hoursOver5Weeks + trainingHours))
print("£{} this month".format(totalPay))
if (totalPay / nWeeks) < niThresholdWeekly :
print("no NI to pay!")
if totalPay < incomeTaxThresholdWeekly * nWeeks :
print("no income tax to pay!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment