Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Blockpy #22.5: Help? Don't know what to do now. Fundamentals of Programming Assignments Programming 22- Return and Print Programming 22- Return and Print Account Home
Blockpy #22.5: Help? Don't know what to do now.
Fundamentals of Programming Assignments Programming 22- Return and Print Programming 22- Return and Print Account Home Announcements Dashboard BlockPy: 22.5) Making a Receipt Write a function receipt that consumes a float representing the price of a meal. The function needs to do the following 1. Calculate the discounted price by multiplying the price byla 10% discount) 2. Return the discounted price. 3. Print out the original price passed in. 4. Print out the discounted price. Modules Courses Syllabus Assignments Calendar Grades 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 Cal this function on the original $20 meal price twice. Do not unit test this function. Read over all the above carefully, and consider the effects of printing and returning. If you're struggling, here's one last hint variables are your friend! Pages Collaborations Chat Console Original Drice: 28 Discounted Price: 18.0 Original Price: 18 Discounted Price: 16.2 Feedback: Algorithmer View Trace Initialization Problem The variable cake reciept was used on line 10, but it was not given a value on a previous line. You cannot use a variable until it has been given a value Media Gallery My Media Starfish Cours Eval Get Help on Circlein Blocks Split Text Reset Import datasets Uploed - 9 History BlockPy Dashboard from cis100 mortsert equal 2 dot make receipt (price): discount Pric 0.9 print originalot", price print i cittad Price, discount return dit m k receipt (20) Teint assert equal interactiept 18), 16.21 A 13
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