Question: I need help with this in python programming The fuel efficiency (miles per gallon (MPG)) of an automobile driven on a highway can be calculated

I need help with this in python programming

The fuel efficiency (miles per gallon (MPG)) of an automobile driven on a highway can be calculated with the following formula:

???? = 71.7 ?? (2 + 0.0192 ? ??)?4.5 + ??(?5.1??) ? 1

Where: - s is the speed of the car in miles per hour.

- e is the mathematical constant known as the Euler's number

Given this formula, you can now figure out how much gasoline is needed for a particular long distance trip. A program that asks the user to enter data for the average speed driven during a trip (in miles per hour (MPH)), the distance traveled during the trip (in miles) and the cost of gasoline (dollars per gallon). The output of the program should print the fuel efficiency (FE), total number of gallons consumed during the trip, and the total cost of the consumed gasoline. When printing the results, you can round the values by using the function round(someValue, 2) that way the results will be displayed with 2 decimal places.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!