Question: Directions Styles Modify your Miles Per Gallon2. Program to ask the users Do you want to calculate miles per gallon? If their answer is y

 Directions Styles Modify your Miles Per Gallon2. Program to ask the

Directions Styles Modify your Miles Per Gallon2. Program to ask the users "Do you want to calculate miles per gallon?" If their answer is "y" then execute the program. If their answer is n then have program say "Okay, bye!". Use a while statement to have the program check their answer. Also allow the user to reenter miles driven and gallons used if the value(s) were not greater than zero. Ox Modify your IPO chart Use Spyder to create the program Name it FirstNamelastNameMilesPerGallon3. Use your first name and last name in the file name. Output: The Miles Per Gallon program Do you want to calculate miles per gallon: Enter y for yes or n for no. Y Enter miles driven: 150 Enter gallons of /zas used:35.875 Miles Per Gallon: 4.18 Continue? y/y 0 Enter miles driven: Enter gallons of/gas used: 35.875 Both entries must be greater than zero. Please try again. Enter miles driven: Enter gallons of gas used: 200 47.3 4.22 Miles Per Gallon Continue? yn Okay! Bye D) Focus W 89 C

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!