Question: using python: Fix the program so that it passes all the tests by changing only three lines of code Discount A retailer is selling miscellaneous
using python: Fix the program so that it passes all the tests by changing only three lines of code
Discount
A retailer is selling miscellaneous items. The retailer wantsto ernter
- unit price (decimal value)
- quantity (whole number)
- discount per cent (whole number)
Computer should calculate discount and total price
If total price is $45 or greater, the retailer will ship for free
Tests
|Unit Price|Quantity |Discount |Output | |---| --- |--- |--- | |100|10| 20 |Total price is 800.0| | | | |That's a savings of 200.0| | | | |Free shipping: True| |12.5|4| 10 |Total price is 45.0| | | | |That's a savings of 5.0| | | | |Free shipping: True| |2.25|8| 5 |Total price is 17.1| | | | |That's a savings of 0.9| | | | |Free shipping: False|
Be sure to fill out author and date Only change 3 lines of code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
