Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
Question
To do what is inside the sheets.
Transcribed Image Text:CNET-142 - Introduction to Python
Lab 2- Calculate car efficiency
For all the lab assignments in this class, you CAN'T use any online Python compiler. You MUST use one of the Python
compilers/interpreters you have installed on your local computer system. Some of the locally installed Python
compilers/interpreters are: Python IDLE, Pycharm and Microsoft Visual Studio Code Python.
Regardless which one you use, you must able to save the complete python file (.py file) to be submitted as part of the
lab.
IDLE is the easiest to use and it is already installed when you install Python on your system.
For this lab, you need to write a Python program to do the following.
1. Write your program to do the following:
●くろまる
●くろまる
●くろまる
●くろまる
●くろまる
●くろまる
●くろまる
Print out your name and date as the beginning of the program (see your lab1)
Prompt user for the tank's capacity in gallons
Prompt user for miles_per_gallon
Prompt user to enter gas price per gallon.
Cost 100 miles_per_gallon * gas_price
Distance
capacity * miles_per_gallon
Print cost and efficiency
Use a SIGLE if elif... else statement to print out the following:
MPG is less than 30: print out "It is not fuel efficient car."
MPG is between 30 and 40, "It is average fuel efficient car."
MPG is between 40 and 50, "It is fuel efficient car"
MPG is greater than 50, "It is very fuel efficient car"
O
=
For user's input: YOU MUST USE the following input as test case:
Test case #1:
=
capacity: 18.5
miles per gallon: 33
price per gallon: 3.89
CNET-142: Ron Sha Lab 2: Car Mileage
2021年03月29日 11:02:27
Enter the capacity of the car's gas tank (in gallons): 18.5
Enter car's miles per gallon: 33
Enter price per gallon: 3.89
Cost for driving 100 miles is 11ドル.79
Distance on a tank of gas is
Your car MPG is 33.0. It is average fuel efficient car.
610.50 miles
Transcribed Image Text:CNET-142-Introduction to Python
Test case #2:
capacity: 18.5
· miles per gallon: 45
price per gallon: 3.89
•
CNET-142: Ron Sha Lab 2: Car Mileage
2021年03月29日 11:03:31
Enter the capacity of the car's gas tank (in gallons): 18.5
Enter car's miles per gallon: 45
Enter price per gallon: 3.89
Cost for driving 100 miles is $ 8.64
Distance on a tank of gas is 832.50 miles
Your car MPG is 45.0.
Test case #3:
. capacity: 18.5
·
•
miles per gallon: 60
price per gallon: 3.89
It is fuel efficient car.
After you run your program, it should have output similar to the one below:
CNET-142: Ron Sha Lab 2: Car Mileage
2021年03月29日 11:04:02
Enter the capacity of the car's gas tank (in gallons): 18.5
Enter car's miles per gallon: 60
Enter price per gallon: 3.89
Cost for driving 100 miles is $ 6.48
Distance on a tank of gas is 1110.00 miles.
Your car MPG is 60.0.
It is very fuel efficient car.
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
This is a popular solution
bartleby
Trending nowThis is a popular solution!
bartleby
Step by stepSolved in 2 steps with 2 images
Knowledge Booster
Background pattern image
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.Similar questions
- So, one of these statements is correct? It is impossible to display on a single map several layers (data) using different coordinate systems. For GIS purposes, it is allowed for data to include several coordinate systems. A map may display several different layers of data, each with its own set of coordinates. A map's layers may not align correctly if you use several coordinate systems to display them. Those things are not includedarrow_forward1. Explain the process of how to make a movable square. 2. If you hold down the "left" button, will the movable square move continuously? Why?arrow_forwardWhat happens if you open a picture and then change the size of the frame? You might try opening a picture once you've adjusted the frame size to your liking.arrow_forward
- For the second image I'm trying to figure out how to use the input from the program and create the columns that show "destination, reg.price, reduced and sale price"arrow_forwardWith vim, you need to type an x followed by a p when the cursor is on the initial letter of a word. Walk me through what happens.arrow_forwardWhat happens when you open a picture and then change the frame size? What happens if you open a picture after resizing the frame to the desired dimensions?arrow_forward
- Construct a color palette as shown in the fig below. Your output shows 64 color combinations. Paste the MATLAB CODE as Text in the space provide and attach a screenshot of the image. Note: Do not try to get the same sequence of colors)arrow_forwardWrite an algorithm that outline how to calculate the room area for the image belowarrow_forwardSo, are these statements correct? It is impossible to display on a single map several layers (data) using different coordinate systems. For GIS purposes, it is allowed for data to include several coordinate systems. A map may display several different layers of data, each with its own set of coordinates. A map's layers may not align correctly if you use several coordinate systems to display them. Those things are not includedarrow_forward
- Python Program (Machine learning) Take pictures of the rectangular objects and segment out the objects from the background. a. One object per imageb. Multiple rectangular objects per imageThe rectangular or square objects could be whatever size you can find. You can repeat the same for circular objects too.arrow_forwardPortrait and Landscape arearrow_forwardIn between those long numbered lines on a ruler, there are shorter lines. What name do we use for those units?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education