Skip to content

Instantly share code, notes, and snippets.

@g-leech

g-leech/ta_tax.py Secret

Created Jun 4, 2021
Embed
What would you like to do?
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