Data Science · Beginner · 50 points · about 120 min · due 20 Nov 2026
Insurance companies calculate premiums based on the amount of coverage, the type of insurance, and the risk associated with the insured person, property, or activity. Incorrect calculations can lead to underpricing or overpricing insurance policies.
In this challenge, you will build an insurance premium calculator that uses provided premium rates and risk factors to calculate the estimated premium payable by a policyholder. The calculator should accept user inputs, validate them, apply the specified calculation rules, and present a clear breakdown of the result.
You will work with a predefined set of insurance rules and sample cases. The objective is to demonstrate how mathematical calculations, conditional logic, and input validation can be used to solve a practical financial problem.
This is an educational simulation, not a model for setting real-world insurance prices.
Stuck? Open a hint. Try the first one before the next.
Calculate the base premium before applying the supplied risk adjustments.
Check whether the rules require adjustments to be applied sequentially or independently.
Keep the calculation logic separate from input collection and output presentation where practical.
Use decimal-safe monetary calculations where supported.
Compare your results with manually calculated examples before submitting.
Develop a functional insurance premium calculator that calculates the estimated insurance premium using a supplied coverage amount, base premium rate, and applicable risk factors. The solution must apply the given rules consistently and explain how the final premium was obtained.
Mathematical and financial calculations, Conditional logic and rule implementation, Input validation and error handling, Testing and debugging, Problem-solving, Technical documentation
A strong submission must demonstrate all of the following:
Calculation accuracy — 30%: Correctly calculates the base premium and applies all supplied risk adjustments.
Risk-factor implementation — 20%: Applies the specified surcharges and discounts in the correct order and according to the supplied rules.
Input validation and error handling — 15%: Identifies invalid inputs and handles boundary cases without producing misleading results.
Testing — 15%: Includes at least five meaningful test cases with expected and actual results.
Output clarity — 10%: Clearly displays the base premium, adjustments, and final premium to two decimal places.
Documentation and usability — 10%: Explains the formula, assumptions, and instructions for running the solution.