Computer Science, asked by monakhoury12, 5 months ago

# 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 = ___

# 3) Fill in the blank to print the result of the conversion
print("The distance in kilometers is " + ___)

# 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 jai696
9

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

# 1) Complete the function to return the result of the conversion

def convert_distance(miles): return miles * 1.6

my_trip_miles = 55

# 2) Convert my_trip_miles to kilometers by calling the function above

my_trip_km = convert_distance(my_trip_miles)

# 3) Fill in the blank to print the result of the conversion

print("The distance in kilometers is " + str(my_trip_km))

The distance in kilometers is 88.0

# 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 " + str(my_trip_km * 2))

The round-trip in kilometers is 176.0

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions