# 1) Complete the function to return the result of the conversion
def convert_distance(miles):
km = miles * 1.6 # approximately 1.6 km in 1 mile
my_trip_miles = 55
# 2) Convert my_trip_miles to kilometers by calling the function above
my_trip_km = 55*1.6
# 3) Fill in the blank to print the result of the conversion
print("The distance in kilometers is " + str(my_trip_km))
# 4) Calculate the round-trip in kilometers by doubling the result,
# and fill in the blank to print the result
print("The round-trip in kilometers is " +
Answers
Answered by
0
Answer:
# 1)
def (miles):
km = miles * 1.6 # approximately 1.6 km in 1 mile
return km
my_trip_miles = 55
print(convert_distance(my_trip_miles))
# 2)
def (km):
miles = km / 1.6 # approximately 1.6 km is 1 mile
return miles
my_trip_km = 55*1.6
print(convert_distance(my_trip_km))
# 3)
The distance in kilometers is 55
# 4)
print("The round-trip in kilometers is " + str(my_trip_km * 2))
Similar questions