Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Develop and execute at least 12 sets of your own well-designed and thorough testcases. In order to sell as much of their paint as
Develop and execute at least 12 sets of your own well-designed and thorough testcases. In order to sell as much of their paint as possible, Acme Paints is advertising some special sale prices. Their paints are available in gallon-size, quart-size, and pint-size containers, and the more you buy, the more you save. Each pint-size container of paint (regardless of the color) costs $5. However, if a customer buys at least a quart of paint (in any combination of quart-size or pint-size containers, and in any combination of colors), he or she would pay only $9 for each quart. Similarly, if a customer buys at least a gallon of paint (in any combination of gallon-size, quart-size, or pint-size containers, and in any combination of colors), he or she would pay only $17 for each gallon. For example, suppose a customer buys the following colors and containers of paints: 1 gallon, 2 quarts, and 1 pint Green: 2 gallons, 1quart, and 1 pint Yellow: 1 gallon, 2 quarts, and 0 pints O gallons, 1 quart, and 1 pint Red: Blue: At first glance it might seem that the customer has bought a total of 4 gallons, 6 quarts, and 3 pints of paint altogether. However, note that since 2 pints make a quart, a better way to write the total would be as 4 gallons, 7 quarts, and 1 pint. Also, note that since 4 quarts make a gallon, the final total would best be written as 5 gallons, 3 quarts, and 1 pint. Therefore the final cost would be: 5 gallons * $17 per gallon + 3 quarts * $9 per quart + 1 pints * $5 per pint or $117. Obviously, this is way beyond the ability of the checkout person at Acme Paints, who never did like higher math. So the manager of Acme Paints has hired you, a famous local computer programmer, to write a computer program to help out the store and make the sale a success. Design, write, and execute a Python language program that uses the above rules to assist in a paint sale. Your program should first ask the user how many containers of each size and each color of paint are being sold. It should then display a summary of the sale, first listing the number of containers being sold of each size and of each color of paint, and then listing the total adjusted amount being sold of each size for all colors of paint together. Finally, it should display the total cost of the sale.
Step by Step Solution
★★★★★
3.43 Rating (169 Votes )
There are 3 Steps involved in it
Step: 1
Code printAcme Pain Pricing Program version 10 printc your name 2021 conttypegallonquartpint redpain...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started