Convert kilometers to miles #
Write a Python function that converts distance measurements in kilometers to miles. The function should take a distance value in kilometers as input and return the equivalent distance in miles.
To get an approximate result for this challenge, divide kilometers with 1.609 to get the length in miles.
Tests #
convert_km_to_mi(0)should return a value of0convert_km_to_mi(10)should return a value of6.215040397762586convert_km_to_mi(20)should return a value of6.215040397762586
Getting Started with Python
Data Types
Python Functions
Statements in Python
Basic Debugging in Python
Basic Algorithm
Object-Oriented Programming
Error Handling
Intermediate Algorithm
Python Modules