Bringing Python Fundamentals Together
Task
Swipe to start coding
- Print a title
"Shopping Receipt"
and a divider line (using-
) withprint()
. - Print the price for the first item:
- It is priced per weight at $162 per unit.
- The customer bought 1.2 of it.
- Calculate and print the total price for this item.
- Print the price for the second item:
- Originally $25, but comes with a discount of $3.
- Calculate and print the final price after the discount.
- Print the subtotal and tax (8%) using
print()
.
python
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 5