Option 2 (max poits: 100): Write a function parking_fine that
has one
parameter - the
number of parking violations per year. The function reads the category
for each violation (assume that the input is an integer 1, 2, or 3.
Assume that the input is VALID).
The function finds and returns the total amount
paid for parking violations, the average violation fine and the number of violations
in EACH category.
Use the table below.
Violation Category |
Violation Fine |
1 |
$35 |
2 |
$50 |
3 |
$75 |
Write a program (MAIN) that reads the number of parking violations per year. The
program uses function parking_fine to find the total amount
paid for parking violations, the average violation fine and the number of violations
in EACH category.