0
Help me! The code doesn't work (NO OUTPUT)
Hello, i have a problem with a code of one work of my college, the problem is that: I need to generate a code that convert the miles to km. Firstly I need use the "def" function, so that's the code: def convert_distance(miles): km= miles * 1.6 convert_distance(55) print(km) When I tried to run the code the output is "no output". In the first I thought that the error is the indentation, but no I fixed this problem and still doesn't work, please if I understand what is the problem, I would greatly appreciate the help. I'm new in this issue and I want a tutor :(.
3 Respuestas
+ 3
def convert_distance(miles):
km= miles * 1.6
print(km)
convert_distance(55)
+ 3
def convert_distance(miles):
return miles * 1.6
km = convert_distance(55)
print(km)
+ 1
Genuine Stalwart Thank u so much!, I don't know that this is the way to write this code! Thanks!