Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to calculate the total price of produce purchased at the grocery store. Here are the details: Take three separate inputs: the quantity

Write a program to calculate the total price of produce purchased at the grocery store. Here are the details:
Take three separate inputs: the quantity of apples, pears, and peaches purchased.
Calculate the price for the produce purchase by multiplying the price per unit by the number of units bought.
Display the subtotal for each purchase, for example: Purchased 5 pounds of apples at $0.75 per pound subtotal is $3.75.
Display the total for all produce purchased.
Calculate and display sales tax for the purchase, sales tax is 8.25 percent.
Display the grand total for all produce and sales tax. Make sure to format the output as currency.
Use string formatting.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions