Challenge: Converting Kilometers to Miles
Uppgift
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
.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 2. Kapitel 5
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Awesome!
Completion rate improved to 1.67
Challenge: Converting Kilometers to Miles
Svep för att visa menyn
Uppgift
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
.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Awesome!
Completion rate improved to 1.67Avsnitt 2. Kapitel 5
single