Exercise 3: Convert Miles to Kilometers

Write a method that takes distance in miles as input and converts it into kilometers.

Problem statement

Write a method named miles_to_kilometers that inputs a number, in this case, distance covered in miles, and converts it into distance covered in kilometers.

Example

miles_to_kilometers(25)

This should print out:

40.2335

Note: You just need to provide the definition of the method, and it will be automatically evaluated on the given input value.

Try it yourself

Press + to interact
# Start your code here