Write a program that calculates the cost of an auto insurance policy. The program prompts the user
Fantastic news! We've Found the answer you've been seeking!
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 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 of $100
- 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
Related Book For
Posted Date: