Answer:
Step-by-step explanation:
The following is written in Python. It is a function that takes in two parameters called miles for miles/gallon and gasCost for gas dollars/gallon. Then it creates three variables for each number of miles used (10,50,400) and calculates the total cost for each. Finally, it returns all three costs to the user
def mileage(miles, gasCost):
tenMiles = (10.00 / miles) * gasCost
fiftyMiles = (50.00 / miles) * gasCost
fourHundredMiles = (400.00 / miles) * gasCost
return tenMiles, fiftyMiles, fourHundredMiles