Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Converting Kilometers to Miles | Variables and Types in Python
Introduction to Python(ihor)
course content

Kursinnhold

Introduction to Python(ihor)

Introduction to Python(ihor)

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
Challenge: Converting Kilometers to Miles

Oppgave

Swipe to start coding

You are traveling from San Francisco to New York. The distance between them is approximately 4677.4 kilometers. You want to calculate the distance in miles.

  • Convert the distance from kilometers to miles by dividing distance_in_kilometers by 1.609. Store the result in the variable distance_in_miles.
  • Create a variable called int_distance_in_miles to store the integer distance in miles.
  • Convert the value of distance_in_miles to an integer and store it in the variable int_distance_in_miles.

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 2. Kapittel 5
toggle bottom row

book
Challenge: Converting Kilometers to Miles

Oppgave

Swipe to start coding

You are traveling from San Francisco to New York. The distance between them is approximately 4677.4 kilometers. You want to calculate the distance in miles.

  • Convert the distance from kilometers to miles by dividing distance_in_kilometers by 1.609. Store the result in the variable distance_in_miles.
  • Create a variable called int_distance_in_miles to store the integer distance in miles.
  • Convert the value of distance_in_miles to an integer and store it in the variable int_distance_in_miles.

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 2. 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