Bringing Python Fundamentals Together
Tehtävä
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()
.
Shopping Receipt
------------------------
Item 1: $194.4
Item 2: $22
------------------------
Subtotal: $216.4
Tax (8%): $21.64
------------------------
Thank you for shopping!
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 1. Luku 5
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Awesome!
Completion rate improved to 1.64
Bringing Python Fundamentals Together
Pyyhkäise näyttääksesi valikon
Tehtävä
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()
.
Shopping Receipt
------------------------
Item 1: $194.4
Item 2: $22
------------------------
Subtotal: $216.4
Tax (8%): $21.64
------------------------
Thank you for shopping!
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Awesome!
Completion rate improved to 1.64Osio 1. Luku 5
single