寻找税务价值

2024-05-12 14:54:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图找到应该在第10行的税值:税=$。你知道吗

我使用的税码是

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

Tags: inputmainevallineamountinttaxprint