PY
py
1
2
3
4
5
6
7
8
9
# Created to aswer this question:
# https://www.sololearn.com/Discuss/1490832/when-i-run-this-code-the-output-is-shown-as-enter-the-km-miles-is-4-8000-but-i-want-it-to-show-as
def convert(miles):
km = 1.6 * miles
return km
inp = float(input())
print(f'{inp} mi can be written as {convert(inp)} km')
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run