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

Course Content

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

Task

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.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 5
toggle bottom row

book
Challenge: Converting Kilometers to Miles

Task

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.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 2. Chapter 5
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt