Loading lesson…
Level 1 · Apprentice0 XP
Never floats: minor units, decimals, currencies, rounding and fair splitting.
Step 1 / 6
ProblemA shop adds prices with floating-point numbers. After millions of operations, totals are off by cents and reports never match the bank.
← → step
Before this: FinOps: cloud cost as an architecture decision
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Implement a Money type with plus, minus, times (with explicit rounding) and split, plus tests that show split never loses a cent and that mixing currencies fails.