Answered step by step
Verified Expert Solution
Question
1 Approved Answer
BlockPy 22.5 and 21.2 BlockPy: #22.5) Making a Receipt Write a function make_receipt that consumes a float representing the price of a meal. The function
BlockPy 22.5 and 21.2
BlockPy: #22.5) Making a Receipt Write a function make_receipt that consumes a float representing the price of a meal. The function needs to do the following Server Executio 1. Calculate the discounted price by multiplying the price by .9 (a 10% discount) 2. Return the discounted price 3. Print out the original price passed in. 4. Print out the discounted price Now, you just bought a meal for $20, but the manager was so impressed with your programming ability that they decided to discount it twice. Call this function on the original $20 meal price twice Console Feedback Instructor Feedback You should not print outside the function. Only the function should print. Incorrect Answer discount price 18.e original price 20 Final price 18.0 discount price 16.2 original price 18.e Final price 16.2 Run Blocks SplitTxt ResetUploadHistory def make_recept(amount): amount *0.9; 3print("discount price: ",total) 4 print("original price,amount) total = return total price 20 8 price -make_recept (price) 9print( Final price: ",price) 1e price -make_recept (price) 11 print("Final price: ",price)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started