## 如何在税务计算器中计算Python的错误内容来源于 Stack Overflow，并遵循CC BY-SA 3.0许可协议进行翻译与使用

• 回答 (1)
• 关注 (0)
• 查看 (81)

```def main():
actual_value = float(input('Enter value of property: ')
calc_assessed_value(actual_value)

def calc_assessed_value(number):
assessed_val = float(number * (6 / 10))
print('The assessed value is equal to 60% of the actual value.')
print('The assessed value for this property is: ', assessed_val)
calc_prop_tax(assessed_val)

def calc_prop_tax(number):
tax_rate = float(0.72)
prop_tax = float(number / 100 * tax_rate)
print('The tax is 72 cents for every \$100 of the assesed value.')
print('The total property tax is: \$', prop_tax)

main()```

### 1 个回答

```def main():
actual_value = float(input('Enter value of property: '))
calc_assessed_value(actual_value)

def calc_assessed_value(number):
assessed_val = float(number * (6 / 10))
print('The assessed value is equal to 60% of the actual value.')
print('The assessed value for this property is: ', assessed_val)
calc_prop_tax(assessed_val)

def calc_prop_tax(number):
tax_rate = float(0.72)
prop_tax = float(number / 100 * tax_rate)
print('The tax is 72 cents for every \$100 of the assesed value.')
print('The total property tax is: \$', prop_tax)

main()```