Write a Python program that determines the penalty a driver should receive due to speeding. The program prompts the traf
Posted: Thu May 26, 2022 10:03 am
Write a Python program that determines the penalty a driver should receive due to speeding. The program prompts the traffic prosecutors to enter the speed and type of vehicle of the drivers. Requirement a) The default speed limit is 60 km/hr b) The program will prompt the users to re-enter the vehicle type until a valid entry is keyed in. c) The Python program will determine the type of penalty the driver should receive in terms of Demerit point and composite fine or be prosecuted in court based on the type of vehicle. d) Able to iterate over the vehicle type repeatedly until the condition is satisfied e) The Speed exceeds by must be in 2 decimal places (see sample output) Note: Apply what you have learned from Topic 1 to Topic 3. No Speed Limit Exceeded by Fine Demerit Points Light Vehicle Heavy Vehicle Awarded Speed limit exceeded by 1 4 $150 $200 not more than 20 km/hr Speed limit exceeded by 2 6 $200 $250 more than 20 km/hr but not more than 30 km/hr Speed limit exceeded by 3 more than 30 km/hr but not 8 $300/- $400/- more than 40 km/hr Speed limit exceeded by more than 40 km/hr but not more than 50 km/hr 4 12 Prosecution in court Prosecution in court 5 18 Prosecution in court Prosecution in court Speed limit exceeded by more than 50 km/hr but not more than 60 km/hr Speed limit exceeded by: more than 60 km/hr 24 Prosecution in court Prosecution in court 6