Design a program that will determine how much money you need each month to pay for keeping the car • Your insurance is a constant value and costs $1,600 per year. • Maintenance is determined by the number of miles driven each month at a rate of $0.005 per mile. This means that the miles driven each month should be user input. • Fuel is also determined by the number of miles driven each month. The total cost of fuel is calculated by multiplying the number of miles driven by cost of gasoline divided by your car's fuel efficiency. So. This means that the price of gas and your car's fuel efficiency are also needed as input. The output for your algorithm should be the total cost of using your car PER MONTH

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%

Please explain the steps of the coding attached.

 

Problem #2 - Car Expense
As a college student, you probably are paying close attention to your budget. For this problem, let us assume
that you are working on budgeting and trying to determine the cost of using your car. The cost of using your
car is determined by:
• insurance,
• maintenance, and
• fuel
Design a program that will determine how much money you need each month to pay for keeping the car
• Your insurance is a constant value and costs $1,600 per year.
• Maintenance is determined by the number of miles driven each month at a rate of $0.005 per mile. This
means that the miles driven each month should be user input.
• Fuel is also determined by the number of miles driven each month. The total cost of fuel is calculated by
multiplying the number of miles driven by cost of gasoline divided by your car's fuel efficiency. So.. This
means that the price of gas and your car's fuel efficiency are also needed as input.
• The output for your algorithm should be the total cost of using your car PER MONTH
Some people in your Breakout Room may still be working on Problem #1, so it's okay to "fly solo" and get
started on this part of the lab yourself. As with Problem #1, start by designing and drawing a flowchart for
your algorithm first, before writing any code.
Here's some sample output. Your output will vary based on your input:
RESTART: 7Users/keithbagley/Dropbox/NURTHEASTERN UNIVERSITY,
s/lab1/problem2.py
How many miles per month do you drive? 100
What is the average price of a gallon of gas? 2.50
How many miles per gallon does your car get on average? 20
Your total expense per month is $146.33
If enough of you are a similar point in the development effort, feel free to talk amongst yourselves about
your approach. It's not "cheating" to bounce ideas off of each other as long as you're not copying code.
Transcribed Image Text:Problem #2 - Car Expense As a college student, you probably are paying close attention to your budget. For this problem, let us assume that you are working on budgeting and trying to determine the cost of using your car. The cost of using your car is determined by: • insurance, • maintenance, and • fuel Design a program that will determine how much money you need each month to pay for keeping the car • Your insurance is a constant value and costs $1,600 per year. • Maintenance is determined by the number of miles driven each month at a rate of $0.005 per mile. This means that the miles driven each month should be user input. • Fuel is also determined by the number of miles driven each month. The total cost of fuel is calculated by multiplying the number of miles driven by cost of gasoline divided by your car's fuel efficiency. So.. This means that the price of gas and your car's fuel efficiency are also needed as input. • The output for your algorithm should be the total cost of using your car PER MONTH Some people in your Breakout Room may still be working on Problem #1, so it's okay to "fly solo" and get started on this part of the lab yourself. As with Problem #1, start by designing and drawing a flowchart for your algorithm first, before writing any code. Here's some sample output. Your output will vary based on your input: RESTART: 7Users/keithbagley/Dropbox/NURTHEASTERN UNIVERSITY, s/lab1/problem2.py How many miles per month do you drive? 100 What is the average price of a gallon of gas? 2.50 How many miles per gallon does your car get on average? 20 Your total expense per month is $146.33 If enough of you are a similar point in the development effort, feel free to talk amongst yourselves about your approach. It's not "cheating" to bounce ideas off of each other as long as you're not copying code.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Transmission media
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education