So, unless you want to draw erroneous conclusions about how to program, as has become glaringly obvious in this little episode, I suggest you only test your code using your local python interpreter.
I will; however, the online interpreter is the only way to submit our work for the course.
Even so, the function was not the problem. Run this online:
def miles_to_km(miles):
return miles * 1.60934
print miles_to_km(1)