ntax_rates = ["1.2%", "4%", "12%"]
property_tax_rates = {"residential": "1.2%", "commercial": "4%", "luxury": "12%"}
Function to calculate property tax
def calculate_property_tax(property_type, value):
if property_type not in property_tax_rates:
return "Invalid property type"
tax_rate = float(property_tax_rates[property_type])
tax_amount = value (tax_rate / 100)
return round(tax_amount, 2)
Example usage
residential_tax = calculate_property_tax("residential", 500000)
commercial_tax = calculate_property_tax("commercial", 300000)
luxury_tax = calculate_property_tax("luxury", 1000000)
print(f"Residential Property Tax: ${residential_tax}")
print(f"Commercial Property Tax: ${commercial_tax}")
print(f"Luxury Property Tax: ${luxury_tax}")
免责声明:本答案或内容为用户上传,不代表本网观点。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。 如遇侵权请及时联系本站删除。