我试图找到应该在第10行的税值:Tax = $。
我正在使用的税收代码是
x = line6/1000.00
Tax = 0.9x^2 +126.6x - 307.4
Tax = int(100*Tax + 0.5)/100
If Tax <0 then set Tax = 0.0
这是我的代码
def main():
print("IRS Form 1040EZ Tax Computation Program (2015)")
print()
sal = eval(input("Line 1: Enter wages, salaries, and tips: "))
tint = eval(input("Line 2: Enter taxable interest: "))
print()
agros = sal + tint
print("Line 4: Adjusted Gross Income: ",agros)
print()
print("Line 5: Exemption Amount $",10150)
print("Line 6: Taxable Income: $",agros - 10150)
print()
taxw = eval(input("Line 7: Enter tax withheld: "))
print()
x = (agros - 10150) / 1000.00
Tax = 0.9,x**+126.6,x - 307.4
Tax = int(100 * Tax, + 0.5) /100
print("Line 10: Tax = $",Tax)
print()
ref = eval(input("Line 13: Refund Amount: $"))
print()
owe = eval(input("Line 14: Amount You Owe: $"))
main()
我的错误是
Tax = int(100 * Tax, + 0.5)//100
TypeError: 'float' object cannot be interpreted as an integer