Write a function that converts from miles per gallon


Write a function called convert_mileage that converts from miles per gallon to liters per 100 kilometers.
# Test that your functions returns the right values for 20 and 40 miles per gallon.

def conv_mileage(mpg):
mile = 1.609
gal = 3.785
return (100 / (mpg * mile)) * gal

>>> def conv_mileage(mpg):
mpg = raw_input ('How many mpgs?: ')
mile = 1.609
gal = 3.785
return (100 / (mpg * mile)) * gal

>>> 

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a function that converts from miles per gallon
Reference No:- TGS099816

Expected delivery within 24 Hours