Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
Program 1: Insurance Premium.py
Create a Python program that ask the user to input the Car Price and Engine Capacity(cc) for n
cars and store them in twa different lists. The sample input data is shown below.
Car Price - 5000, ssee, 4850, 6see, 58s0, 7808, 765e, 7900, 83ee, 9500
Engine Capacity - 1.3, 2, 1.6, 2.3, 2.6, 3, 3.6, 3.7, 4, 4.4
Your program has to do the following tasks.
2/4
a) Calculate and display the Insurance preniun for each car according to the follov
Store the insurance premium in a List.
Engine Capacity
Car Price
Insurance Premium
1X of car price
2% of car price
3% of car price
5% of car price
7% of Car price
car price < 5e0e
5000
S car price < 5500
5500 S car price < 600e
car price > Ge00
Less than or
equal 3 ce
More than 3 cc
b) Calculate and display the Onroad Price for each car using the formula shown below. Store
it in a list.
on road Price - Car prtce + insurance premtum
e) Calculate and display average Onroad Price.
d) Calculate and display number of cars with Onroad Price <6000.
e) Dsplay the output as follows:
Price
CC
insurance onroad
4000.00
2.60
280.00
4280.00
4560.00
5650.00
6780.00
1.60
3.30
319.20
169.50
271.20
591.50
4879.20
5819.50
7051.20
4.00
1.80
8450.00
9041.50
The Average on road price is
The number of cars above 6000 is
6214.28
2
All amounts should be displayed with two decimai places. Include the following comments at
the beginning of your code.
rile Nene
student 14
Student Nene
or wo
2YOUR NAD
expand button
Transcribed Image Text:Program 1: Insurance Premium.py Create a Python program that ask the user to input the Car Price and Engine Capacity(cc) for n cars and store them in twa different lists. The sample input data is shown below. Car Price - 5000, ssee, 4850, 6see, 58s0, 7808, 765e, 7900, 83ee, 9500 Engine Capacity - 1.3, 2, 1.6, 2.3, 2.6, 3, 3.6, 3.7, 4, 4.4 Your program has to do the following tasks. 2/4 a) Calculate and display the Insurance preniun for each car according to the follov Store the insurance premium in a List. Engine Capacity Car Price Insurance Premium 1X of car price 2% of car price 3% of car price 5% of car price 7% of Car price car price < 5e0e 5000 S car price < 5500 5500 S car price < 600e car price > Ge00 Less than or equal 3 ce More than 3 cc b) Calculate and display the Onroad Price for each car using the formula shown below. Store it in a list. on road Price - Car prtce + insurance premtum e) Calculate and display average Onroad Price. d) Calculate and display number of cars with Onroad Price <6000. e) Dsplay the output as follows: Price CC insurance onroad 4000.00 2.60 280.00 4280.00 4560.00 5650.00 6780.00 1.60 3.30 319.20 169.50 271.20 591.50 4879.20 5819.50 7051.20 4.00 1.80 8450.00 9041.50 The Average on road price is The number of cars above 6000 is 6214.28 2 All amounts should be displayed with two decimai places. Include the following comments at the beginning of your code. rile Nene student 14 Student Nene or wo 2YOUR NAD
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
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
SEE MORE QUESTIONS
Recommended textbooks for you
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