Answer:
Here is the python program:
item_price1 = float(input("Enter price of 1st item:" ))
item_price2 = float(input("Enter price of 2nd item: "))
item_price3 = float(input("Enter price of 3rd item: "))
item_price4 = float(input("Enter price of 4th item: "))
item_price5 = float(input("Enter price of 5th item: "))
sub_total_of_sale = (item_price1 + item_price2 + item_price3 + item_price4 + item_price5)
amount_of_sales_tax = sub_total_of_sale * 0.0725
total = sub_total_of_sale + amount_of_sales_tax
print("Sub Total of the Sale is: ",sub_total_of_sale)
print("The amount of sales tax is: ",amount_of_sales_tax)
print("Total is: ",total)
Step-by-step explanation:
This program first prompts the user to enter price of 5 items and input() function is used here to let the user enter the price.
Next the sub_total_of_sale variable stores the sum of all these 5 items
amount_of_sales_tax stores the sum of sale tax which is 7.25% and sub total of 5 items. here 0.0725 means 7.25/100
total holds the sum of sub total of price of 5 items and sales tax.
Lastly it displays sub total of sale, amount of sales tax and total using print statement.