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

Cursusinhoud

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

Taak

Swipe to start coding

The road distance between San Francisco and New York is approximately 4677.4 km. This distance is stored in the variable distance_in_kilometers.

Here's what you need to do:

  • Convert the distance from kilometers (distance_in_kilometers) to miles by dividing it by 1.609. Store the result in the variable distance_in_miles.
  • Create a variable int_distance_in_miles.
  • Convert the variable distance_in_miles to an integer data type.
  • Store the value of distance_in_miles as an integer in the variable int_distance_in_miles.

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

book
Challenge: Converting Kilometers to Miles

Taak

Swipe to start coding

The road distance between San Francisco and New York is approximately 4677.4 km. This distance is stored in the variable distance_in_kilometers.

Here's what you need to do:

  • Convert the distance from kilometers (distance_in_kilometers) to miles by dividing it by 1.609. Store the result in the variable distance_in_miles.
  • Create a variable int_distance_in_miles.
  • Convert the variable distance_in_miles to an integer data type.
  • Store the value of distance_in_miles as an integer in the variable int_distance_in_miles.

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 2. Hoofdstuk 5
Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Onze excuses dat er iets mis is gegaan. Wat is er gebeurd?
some-alt