Question
Write a program that calculates the cost of an auto insurance policy. The program prompts the user to enter the age of the driver and
Write a program that calculates the cost of an auto insurance policy. The program prompts the user to enter the age of the driver and the number of accidents the driver has been involved in. The program should adhere to these additional requirements:
If the driver has more than 2 accidents and is less than the age of 25, deny insurance
If the driver has more than 3 accidents, deny insurance
Include a base charge of $500 dollars for all drivers
If a driver has 3 accidents, include a surcharge of $600
If a driver has 2 accidents, include a surcharge of $400
If a driver has 1 accident, include a surcharge of $200
If a driver is less than the age of 25, include an age fee
The total of the policy amount should include the base, any surcharge, and any age fee
Use a Boolean variable for the purpose of indicating a driver is insurable
Use at least one logical operator
Use at least one if - elif block
Outputs should display currency format with $ signs and commas for thousands as demonstrated in the following example outputs
Prompts and printed output should be formatted as in the example outputs
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started