Discount Price Calculator

discountShopping 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 price in pounds (or in your own currency) (e.g. £90) and a discount rate to apply (e.g. 20%).

Your program will then calculate and display the discounted price.

Video Tutorial

Python Code

Complete the code provided below:


Once your code is done, complete the following tests to check that your code is working as expected:

Test # Input Values Expected Output Actual Output
#1 Price: £100
Discount Rate: 25%
Discount: £25
Discounted Price: £75
#2 Price: £160
Discount Rate: 40%
Discount: £64
Discounted Price: £96
#3 Price: £180
Discount Rate: 10%
Discount: £18
Discounted Price: £162


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.8 / 5. Vote count: 27

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

As you found this challenge interesting...

Follow us on social media!