Python Challenge 1
[Deleted User]
Sec+Posts: 0 Mod
Write a function called "traffic_cop" for enforcing the speed limit. The function should take one parameter named "speed". The parameter "speed" shall be of type integer.
- The speed limit is 75mph.
- For every MPH over the speed limit, the driver is fined $12.47.
- If the driver is going more than 20mph over the speed limit there licence is suspended.
- If the function receives a speed over the limit it should print the fine amount.
- The Function should also print a message if a driver's licence is going to be suspended a message is printed.
- A generic message should be printed if the speed is at or below the speed limit.
Tagged: