Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions