Apply a Discount
beginnerUp next
Up next
Output will appear here...
Complete the function apply_discount(price, percent) so that it returns the price after the discount, rounded to 2 decimal places. The starter code reads the price and the discount percentage and prints whatever your function returns.
For a price of 100 and a discount of 20 percent, a correct solution prints 80.0.
Tip
Make sure you use return, not print, inside the function. If your function has no return, the program prints None.
No comments yet. Start the discussion.