Question: Write a python script to calculate the miles - per - gallon ( MPG ) of a vehicle given the miles driven and the amount

Write a python script to calculate the miles-per-gallon (MPG) of a vehicle given the miles driven and the amount of fuel that was consumed. The script should ask the user to enter both values for miles driven and fuel consumption, then return the resulting MPG after calculating it. The following formula should be used in the calculation:
MPG=(Distance Traveled)/(Fuel Consumed)

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!