Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Systems Design Implementation And Management

Authors: Peter Rob, Carlos Coronel

6th International Edition

061921323X, 978-0619213237

More Books

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago