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 variabledistance_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 variableint_distance_in_miles
.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 5
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Summarize this chapter
Explain the code in file
Explain why file doesn't solve the task
Awesome!
Completion rate improved to 1.67
Challenge: Converting Kilometers to Miles
Swipe to show menu
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 variabledistance_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 variableint_distance_in_miles
.
Solution
Everything was clear?
Thanks for your feedback!
Awesome!
Completion rate improved to 1.67SectionΒ 2. ChapterΒ 5
single