Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Python-3 Online

print ("Welcome to Salesure Tax Payroll Calculator")
while True:
    name=input('Please enter employee name: ')
    salary=float(input("Please enter gross fortnightly payment for "+name+": "))
    annual=salary*52.143 / 2
    if annual>=0 and annual<=15000:
        withold=(salary/100)*5
        payable=salary-withold
    elif annual>=15001 and annual<=40000:
        withold=(salary/100)*15
        payable=salary-withold
    elif annual>=40001 and annual<=90000:
        withold=(salary/100)*28
        payable=salary-withold
    elif annual>=90001 and annual<=150000:
        withold=(salary/100)*21
        payable=salary-withold
    elif annual>150000:
        withold=(salary/100)*13
        payable=salary-withold
    withold=round(withold,2)
    payable=round(payable,2)
    print("Amount of tax to withhold: $",withold)
    print("Salary payable to : $",payable)
    c=input("Do you want to calculate pay for another employee? (y/n): ")
    if c=='n':
        break

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.