LLD - Design — Library Management System
Consider the following pseudo-code snippet. What will be the final value of totalFine after execution?
violations = ["illegalParking", "speeding", "illegalParking"]
fineRates = {"speeding": 120, "illegalParking": 80}
totalFine = 0
for violation in violations:
totalFine += fineRates[violation]