Original Price Calculator

sale-labelsShopping during the sales can sometimes be very confusing. With discounted prices at 10%, 20%, 50% or even 70%!

For this challenge you are going to write a Python script that prompts the user to enter a discounted price in pounds (or in your own currency) (e.g. £90) and the discount rate that this price benefits from (e.g. 25%).

Your program will then calculate and display the original price (price before discount) of the item (e.g. £120).

price-after-discount

Flowchart


Your program will consist of 3 key sections: Input > Process > Output
input-process-output

The flowchart of your program is as follows:
Price-Before-Discount-Flowchart

Python Code


Your task is to complete the following Python code:

Testing


You can now use your code to complete the following test plan:

Test # Input Values Expected Output Actual Output
#1 Discounted Price: £90
Discount Rate: 25%
Original Price: £120
#2 Discounted Price: £45
Discount Rate: 40%
Original Price: £75
#3 Discounted Price: £210
Discount Rate: 30%
Original Price: £300

discounted-prices

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Did you like this challenge?

Click on a star to rate it!

Average rating 3.7 / 5. Vote count: 13

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!

Tagged with: