LLD - Design — Library Management System
Given the following code snippet, what will be the total fine calculated?
violation_fine_rates = {'speeding': 100, 'parking': 50}violations = ['speeding', 'parking', 'speeding']total_fine = sum(violation_fine_rates[v] for v in violations)print(total_fine)
