Write a Python program that determines the penalty a driver should receive due to speeding. The program prompts the traf

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a Python program that determines the penalty a driver should receive due to speeding. The program prompts the traf

Post by answerhappygod »

Write A Python Program That Determines The Penalty A Driver Should Receive Due To Speeding The Program Prompts The Traf 1
Write A Python Program That Determines The Penalty A Driver Should Receive Due To Speeding The Program Prompts The Traf 1 (173.7 KiB) Viewed 32 times
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply