[Solved]627 Functions Hw Driving Cost Functions Write Function Drivingcost Input Parameters Driven Q37242290

Hi, I need help completing the program in Python.
6.27 (Functions) HW: Driving cost – functions Write a function DrivingCost with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar cost to drive those miles. Ex: If the function is called with 50 20.0 3.1599, the function returns 7.89975 Define that function in a program whose inputs are the car’s miles/gallon and the gas dol ars/gallon (both floats). Output the gas cost for 10 miles, 50 miles, and 400 miles, by calling your DrivingCost function three times. Ex: If the input is 3.1599 Then the output is: 1.57995 7.89975 63.198 Your program must define and call the following function: def DrivingCost(drivenMiles, milesPerGallon, dollarsPerGallon) Note: This is a lab from a previous chapter that now requires the use of a function. LAD ACTVITY 6.27.1: (Functions) HW: Driving cost-functions 0/10 main.py Load default template… Define your function here. ‘”‘ Type your code here.'” Show transcribed image text 6.27 (Functions) HW: Driving cost – functions Write a function DrivingCost with input parameters drivenMiles, milesPerGallon, and dollarsPerGallon, that returns the dollar cost to drive those miles. Ex: If the function is called with 50 20.0 3.1599, the function returns 7.89975 Define that function in a program whose inputs are the car’s miles/gallon and the gas dol ars/gallon (both floats). Output the gas cost for 10 miles, 50 miles, and 400 miles, by calling your DrivingCost function three times. Ex: If the input is 3.1599 Then the output is: 1.57995 7.89975 63.198 Your program must define and call the following function: def DrivingCost(drivenMiles, milesPerGallon, dollarsPerGallon) Note: This is a lab from a previous chapter that now requires the use of a function. LAD ACTVITY 6.27.1: (Functions) HW: Driving cost-functions 0/10 main.py Load default template… Define your function here. ‘”‘ Type your code here.'”
Expert Answer
Answer to 6.27 (Functions) HW: Driving cost – functions Write a function DrivingCost with input parameters drivenMiles, milesPerGa… . . .
OR

