Many financial experts advise that property owners should insure their homes or build-ings for at least 80 percent of the amount it would cost to replace the structure. Write a program that asks the user to enter the replacement cost of a building and then displays the minimum amount of insurance he or she should buy for the property.
minimum amount of insurance he or she should buy for the property
code:
#asks the user to enter the replacement cost of a building
cost_building=float(input("Enter the replacement cost of a building: $"))
# insure their homes or build-ings for at least 80 percent of the amount
insurance = cost_building * 0.80
# displays the minimum amount of insurance he or she should buy for the property
print("Minimum amount of insurance should buy for the property: $",insurance)
output:
Enter the replacement cost of a building: $100
Minimum amount of insurance should buy for the property: $ 80.0
>