I understand this somewhat but can someone help explain the steps you took into
ID: 3723306 • Letter: I
Question
I understand this somewhat but can someone help explain the steps you took into doing this problem as well when you do the problem You have been tasked to construct a program that will prepare automobile liability insurance estimates for customers. The input consists of The name of the customer The age of the customer The number of traffic violations Based on this information you will determine their status as a driver, following these guidelines umber of Violations Risk Code Risk Tvpe or More igh oderate oderate 0 More than 4 tickets indicate a "Code 1” driver, which is High Risk. "Code 2" Drivers who have either 2 or 3 tickets, are considered “Moderate Risk" drivers. Any driver with one ticket is deemed "Code 3," and considered "Low Risk." Drivers without any tickets are considered "Code 4," which is "No Risk." Based upon this classification you can then give them the appropriate quote Pricing of Insurance ge Under 25 4 or more 5 or older4 or more umber of Tickets Risk CodePrice 480 410Explanation / Answer
when you construct your program, after taking the input, first step is to validate the input parameters like age and no. of traffic violations. so for this, we can call a separate function, say Validate(), where we can pass the inputs : age and no. of traffic violations. if found invalid, we can display the error message and ask the user to input again.
Second part is to identify the type of risk asssociated and classify the drivers. for this, we can use nested if else loop to check for all the conditions.
Similarly, we can identify insurance price using if else statements.
Finally, display all the values calculated in the format mentioned in the question.