Question: Write a Python program that gets the three following values from the user ( you may assume all inputs are valid and non - negative
Write a Python program that gets the three following values from the user you may assume all inputs are valid and nonnegative:
The distance to a destination in miles
The amount of fuel in the user's car in gallons
The # of miles the user's car can travel per gallon of gas ie Miles Per Gallon
Calculate the percentage of fuel currently in the car that's needed to reach the destination. For example, if gallons are required and there are gallons in the car, the percentage is or if gallons are required and there are gallons in the car the percentage of fuel consumed is
Finally, output whether or not the user needs to refuel during a round trip, using the below table as a guide:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
