Create a Python program that ask the user to input the Car Price and Engine Capacity(cc)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create a Python program that ask the user to input the Car Price and Engine Capacity(cc) for n cars and store them in two different lists. The sample input data is shown below. Car Price = 5000, 5500, 4850, 6500, 5850, 7000, 7650, 7900, 8300, 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. a) Calculate and display the insurance premium for each car according to the following table. Store the insurance premium in a List. Car Price car price <5000 Insurance Premium 1% of car price Engine Capacity Less than or equal 3 cc 5000 car price < 5500 2% of car price 5500 car price < 6000 3% of car price car price > 6000 5% of car price 7% of Car price More than 3 cc b) Calculate and display the Onroad Price for each car using the formula shown below. Store it in a list. Onroad Price = Car price + insurance premium c) Calculate and display average Onroad Price. d) Calculate and display number of cars with Onroad Price <6000. Create a Python program that ask the user to input the Car Price and Engine Capacity(cc) for n cars and store them in two different lists. The sample input data is shown below. Car Price = 5000, 5500, 4850, 6500, 5850, 7000, 7650, 7900, 8300, 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. a) Calculate and display the insurance premium for each car according to the following table. Store the insurance premium in a List. Car Price car price <5000 Insurance Premium 1% of car price Engine Capacity Less than or equal 3 cc 5000 car price < 5500 2% of car price 5500 car price < 6000 3% of car price car price > 6000 5% of car price 7% of Car price More than 3 cc b) Calculate and display the Onroad Price for each car using the formula shown below. Store it in a list. Onroad Price = Car price + insurance premium c) Calculate and display average Onroad Price. d) Calculate and display number of cars with Onroad Price <6000.
Expert Answer:
Related Book For
The Science And Engineering Of Materials
ISBN: 9781305076761
7th Edition
Authors: Donald R. Askeland, Wendelin J. Wright
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
Python and most Python libraries are free to download or use, though many users use Python through a paid service. Paid services help IT organizations manage the risks associated with the use of...
-
Partners have fiduciary obligations to each other. Explain what this means and give examples.
-
(a) Determine the ratio of butadiene to styrene repeat units in a copolymer having a number-average molecular weight of 350,000 g/mol and degree of polymerization of 4425. (b) Which type(s) of...
-
Bobs Best Bread is a family-owned and operated bakery founded in 1956 by Robert Brecca. It is now managed by Roberta Brecca, Roberts granddaughter. About half of the companys 50 employees are members...
-
A proton is accelerated through a potential difference of \(120 \mathrm{~V}\), as shown in Figure P27.55, and fired into a chamber. There is no electric field in the chamber, but there is a...
-
1. If you were in Jimmies shoes, would you sell Greg an equity stake in Lees Ice Cream? Explain. If Jimmie does sell equity to Greg for $3,300, what percentage of the business should he offer? 2....
-
Which OSI layer is responsible for connection - oriented communication?
-
The continuation of this tax credit was part of the infrastructure bill that was not renewed by the U.S. Senate. Discuss the effects of the child tax credit and the earned income tax credit on labor...
-
In a population with an average, = 3, 000 and a variance, 2 = 36,000. Answer the following: (a) If you draw a random sample of 1,000 observations, what is the probability that the sample mean will...
-
For the current year, Electric Corporation expected to sell 40,400 industrial power cords. Fixed costs were expected to total $1,642,000; unit sales price was expected to be $3,500; and unit variable...
-
1. (50 points) Design the simplest circuit that has four inputs, a, b, c, and d, which produces an output value of 1 whenever three or more of the input variables have the value 1; otherwise, the...
-
Kylie Pham is employed as a teacher. On 31 March 2023, Kylie purchased furniture used in her home office entirely for work at a cost of $4,000 with an effective life of 8 years, What is the maximum...
-
Excerpts from the cash flow statements for 2016 through 2020 fiscal years of the three tech companies, Box, FireEye, and MobileIron are presented here. INSTRUCTION a) Input a mathematical formula...
-
How do leaders affect culture?
-
Briefly discuss the implications of the financial statement presentation project for the reporting of stockholders equity.
-
Does the snowflake have rotational symmetry in Figure 1.6? If yes, describe the ways in which the flake can be rotated without changing its appearance. Does it have reflection symmetry? If yes,...
-
A couple in a sport-utility vehicle (SUV) is traveling at 90 km/h on a straight highway. The driver sees an accident in the distance and slows down to 40 km/h in
-
Which of the following statements are hypotheses? (a) Heavier objects fall to Earth faster than lighter ones. (b) The planet Mars is inhabited by invisible beings that are able to elude any type of...
Study smarter with the SolutionInn App