Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Bringing Python Fundamentals Together | First Acquaintance with Python
Introduction to Python
course content

Kursinnhold

Introduction to Python

Introduction to Python

1. First Acquaintance with Python
2. Variables and Types in Python
3. Conditional Statements in Python
4. Other Data Types in Python
5. Loops in Python
6. Functions in Python

book
Bringing Python Fundamentals Together

Oppgave

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().
python

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 5
toggle bottom row

book
Bringing Python Fundamentals Together

Oppgave

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().
python

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 5
Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Vi beklager at noe gikk galt. Hva skjedde?
some-alt