7.23 Clone of LAB: Driving costs - functions Driving is expensive. Write a program with a car's miles/gallon and gas dol
Posted: Tue Jul 12, 2022 8:10 am
Ex: If the function is called with: 50 20.0 3.1599) the function returns: 7.89975 def driving cost (driven miles, miles_per_gallon, dollars_per_gallon) Your program should call the function three times to determine the gas cost for 10 miles, 50 miles, and 400 miles. Note: This is a lab from a previous chapter that now requires the use of a function. LAB ACTIVITY main.py 1 def Drivingcost (drivenMiles, milesPerGallon, dollarsPerGallon): 2 return drivenMiles / milesPerGallon dollarsPerballon name 3 4 if 5 7.23.1: Clone of LAB. Driving costs-functions 9 10 0/10 Load default template. main milesPerGallon float (input()) dollarsPerGallon 6 float (input()) 7 print("%f %f %f %(float(Drivingcost (10,milesPerGallon, dollarsPerGallon)), float (Drivingcost (50, milesPergallon, dollars