Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Bringing Python Fundamentals Together | First Acquaintance with Python
Introduction to Python (dev copy)

Veeg om het menu te tonen

book
Bringing Python Fundamentals Together

Taak

Swipe to start coding

  1. Print a title "Shopping Receipt" and a divider line (using -) with print().
  2. 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.
  3. 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.
  4. 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!

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 5
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

close

Awesome!

Completion rate improved to 1.64

book
Bringing Python Fundamentals Together

Taak

Swipe to start coding

  1. Print a title "Shopping Receipt" and a divider line (using -) with print().
  2. 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.
  3. 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.
  4. 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!

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

close

Awesome!

Completion rate improved to 1.64

Veeg om het menu te tonen

some-alt