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)

Swipe to show menu

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
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

close

Awesome!

Completion rate improved to 1.67

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!

close

Awesome!

Completion rate improved to 1.67

Swipe to show menu

some-alt