Question

Description Write the pseudocode, draw the flowchart, and create the Python code for the following problem: Get the number of miles traveled and the gallons of gas used, and display the miles per gallon. Note: the miles per gallon is the miles traveled divided by the gallons of gas used. Turn in 3 files: the pseudocode, the flowchart, and the Python source code. Write the pseudocode, draw the flowchart, and write the Python program for the following problem. Accept a user's monthly pay amount, as well as the rent, utilities, and grocery bills. Display the amount that will be available at the end of the month for discretionary spending (which could be negative). After coding the program, run it and test it. If there are errors, fix them, until the program works correctly. Next, in addition to the discretionary spending amount, modify the program to output the pay and the total bills,too

          Description
Write the pseudocode, draw the flowchart, and create
the Python code for the following problem:
Get the number of miles traveled and the gallons
of gas used, and display the miles per gallon.
Note: the miles per gallon is the miles traveled divided by
the gallons of gas used.
Turn in 3 files: the pseudocode, the flowchart, and the
Python source code.
Write the pseudocode, draw the flowchart, and
write the Python program for the following problem.
Accept a user's monthly pay amount, as well as
the rent, utilities, and grocery bills. Display the
amount that will be available at the end of the
month for discretionary spending (which could be
negative).
After coding the program, run it and test it. If
there are errors, fix them, until the program works
correctly.
Next, in addition to the discretionary spending amount, modify the program to output the pay and the total bills,too
        
Show more…
description write the pseudocode draw the flowchart and create the python code for the following problem get the number of miles traveled and the gallons of gas used and display the miles pe 74606

Added by Ernest G.

Close

Computer Science and Information Technology
Computer Science and Information Technology
Trishna Knowledge Systems 2018 Edition
AceChat toggle button
Close icon
Ace pointing down

Please give Ace some feedback

Your feedback will help us improve your experience

Thumb up icon Thumb down icon
Thanks for your feedback!
Profile picture
Description Write the pseudocode, draw the flowchart, and create the Python code for the following problem: Get the number of miles traveled and the gallons of gas used, and display the miles per gallon. Note: the miles per gallon is the miles traveled divided by the gallons of gas used. Turn in 3 files: the pseudocode, the flowchart, and the Python source code. Write the pseudocode, draw the flowchart, and write the Python program for the following problem. Accept a user's monthly pay amount, as well as the rent, utilities, and grocery bills. Display the amount that will be available at the end of the month for discretionary spending (which could be negative). After coding the program, run it and test it. If there are errors, fix them, until the program works correctly. Next, in addition to the discretionary spending amount, modify the program to output the pay and the total bills,too
Close icon
Play audio
Feedback
Powered by NumerAI
Ivan Kochetkov Kathleen Carty
Jennifer Stoner verified

Akash M and 95 other subject AP CS educators are ready to help you.

Ask a new question

*

Labs

-

Want to see this concept in action?

NEW

Explore this concept interactively to see how it behaves as you change inputs.

View Labs

*

Key Concepts

-
Key Concept
Premium Feature
Explore the core concept behind this problem.
Play button
Key Concept
Premium Feature
Explore the core concept behind this problem.
Your browser does not support the video tag.

*

Recommended Videos

-
python-problem-1-miles-per-gallon-a-cars-miles-per-gallon-mpg-can-be-calculated-with-the-following-formula-mpg-miles-driven-gallons-of-gas-used-write-a-program-that-asks-the-user-to-input-th-33663

Text: Python Problem 1: Miles Per Gallon - A car's miles-per-gallon (MPG) can be calculated with the following formula: MPG = Miles driven / Gallons of gas used Write a program that asks the user to input the number of miles driven and the gallons of gas used. It should then calculate the car's MPG and display the results. Problem 2: Total Purchase - A customer in a store is purchasing five items. Write a program that asks for the user to input the price of each item, then displays the subtotal of the sale (all 5 prices together without sales tax), the amount of sales tax on the total purchase, and the total amount owed. Assume that the sales tax is 8 percent. Make sure that all of your dollar amount outputs are rounded to two decimal places and have a dollar sign attached.

Akash M.

can-you-please-answer-this-question-in-a-flowchart-versionflowchart-miles-per-gallon-draw-a-flowchart-for-an-algorithm-that-calculates-and-prints-the-overall-mpg-miles-per-gallon-for-a-serie-94305

Can you please answer this question in a flowchart version? Flowchart - Miles Per Gallon Draw a flowchart for an algorithm that calculates and prints the overall MPG (miles per gallon) for a series of miles and gallons user inputs. Use a loop to repeatedly ask the user to enter a miles value and a gallons value. Within the loop, accumulate miles and gallons separately. The algorithm should generate a display of prompts, inputs, and final output that looks like this: Sample session: Do you want to calculate miles per gallon? (y/n): y Enter miles: 35 Enter gallons: 1 Do you want to continue? (y/n): y Enter miles: 36 Enter gallons: 1 Do you want to continue? (y/n): n Overall MPG = 35.5 Provide a graceful response if the total gallons equals zero.

Akash M.

description-draw-the-flowchart-for-a-program-that-calculates-the-projected-cost-of-an-automobile-trip-assume-that-the-users-car-travels-20-miles-per-gallon-of-gas-design-a-program-that-promp-91661

start housekeeping() detailLoop() Declarations: num numMilesDriven num costPerGallon num tripCost num newTripCost num INCREASE = 0.10 num MILES_PER_GALLON = 20 string MILES_PROMPT = "Enter the number of miles driven" string GALLON_PROMPT = "Enter the current cost per gallon" string ENDLINE = "End of program" return housekeeping() detailLoop() endOfJob() stop return return

Akash M.


*

Recommended Textbooks

-
Computer Science and Information Technology

Computer Science and Information Technology

Trishna Knowledge Systems 2018 Edition
achievement 1,799 solutions
Introduction to Programming Using Python

Introduction to Programming Using Python

Y. Daniel Liang 1st Edition
achievement 1,520 solutions
Computer Science - An Overview

Computer Science - An Overview

Glenn Brookshear, Dennis Brylow 12th Edition
achievement 1,381 solutions

*

Transcript

-
00:01 So here we can present the python code for both the problem.
00:04 So for problem 1, which is miles per gallon, so we have to write miles driven is equals to float input enter number of miles driven here gallons used is equals to float input enter gallons of gas used then calculate mpg so here mpg is equals to miles driven by gallons used then display the result here we have to write print f dash your cars mpg is m pg 12 miles per gallon now this is for problem 1 code now the code for problem 2 which is total purchase so we have to write here sales tax rate prices for i in range by price is equals to float input enter the price i plus 1 now further we have to write like item price item prices dot append price subtotal is equals to sum item price sales tax is equals to subtotal multiply by sales tax rate then total amount is equals to subtotal plus sales tax so here print f subtotal print f sales tax print f total amount so this is the whole code for both the problems...
Need help? Use Ace
Ace is your personal tutor. It breaks down any question with clear steps so you can learn.
Start Using Ace
Ace is your personal tutor for learning
Step-by-step explanations
Instant summaries
Summarize YouTube videos
Understand textbook images or PDFs
Study tools like quizzes and flashcards
Listen to your notes as a podcast
Continue solving this problem
Create a free account to:
  • View full step-by-step solution
  • Ask follow-up questions with Ace AI
  • Save progress and study later
Continue Free
Join the community

18,000,000+

Students on Numerade


Trusted by students at 8,000+ universities

Numerade

Get step-by-step video solution
from top educators

Continue with Clever
or



By creating an account, you agree to the Terms of Service and Privacy Policy
Already have an account? Log In

A free answer
just for you

Watch the video solution with this free unlock.

Numerade

Log in to watch this video
...and 100,000,000 more!


EMAIL

PASSWORD

OR
Continue with Clever