Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python returning and printing problem. Follow directions given please! How do I return and print this function properly as directed? Please look at feedback as

Python returning and printing problem. Follow directions given please! How do I return and print this function properly as directed? Please look at feedback as well and follow all steps listed. Thanks.image text in transcribed

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: 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. Feedback: Incorrect Answer Instructor Feedback Console 18.0 You should not print outside the function. Only the function should print. Run Blocks Split /Text | Reset O Upload History 1 def make_receipt (price) 2 return(price*.9) 3 print(price) 4 print (make_receipt (20))

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

Step: 3

blur-text-image

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

Databases And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

What is the relationship between diversity, inclusion, and equity?

Answered: 1 week ago