Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

What are Fatty acids?

Answered: 1 week ago

Question

What are Electrophoresis?

Answered: 1 week ago