Ruben T. answered 02/11/21
Backend Engineer
Ethan H.
asked 02/11/21Other part of question
Each house owner must pay tax based on the value of the house. Houses over $50,000 pay 1% of their value in tax, houses over $100,000 pay 1.5% of their value in tax and houses over $200,000 pay 2% of their value in tax. All others pay no tax.
Input the value of a house Output the value of the house, the tax amount in percentage and tax amount (in dollars), and total amount (house plus tax amount).
Dollar amounts have to show $ symbol
Ruben T. answered 02/11/21
Backend Engineer
Patrick B. answered 02/11/21
Math and computer tutor/teacher
houseValue = input("Please input the value of the house:>")
taxPercent=0
if float(houseValue)>=200000:
taxPercent=0.02
elif float(houseValue)>=100000:
taxPercent=0.015
elif float(houseValue)>=50000:
taxPercent=0.01
taxAmount = round(float(taxPercent)*float(houseValue),2)
print("*********************************")
print(" the value of the house is $"+str(houseValue))
print(" the tax percent is " + str(float(taxPercent)*100) +"%")
print(" the tax amount is $"+ str("{:.2f}".format(taxAmount)))
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.