Question

What discount rate will be applied to the purchase_price inpurchase_price- 92.50 discount amount = 0 Ar purchase_price < 50: discount_amount = purchase_price*.01 elit purchase_price < this code snippet?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The discounted price that will be applied is ,

Where purchase_price <100

discount_amount = purchase_price * .05

discount_amount = 92.5 * 0.05

discount_amount = 4.625

This happens because 92.5 is greater than 50 so if will not be executed. 92.5 is also greater than 75 so the first elif will also not get executed. But 92.5 is less than 100 so the second elif will be executed.

If you liked the solution then give a thumbs up ?

Add a comment
Know the answer?
Add Answer to:
What discount rate will be applied to the purchase_price in this code snippet? purchase_price- 92.50 discount...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT