Question: Write a program that asks the user to input a speed limit followed by a driver's speed. Use the following rules to display proper messages.

Write a program that asks the user to input a speed limit followed by a driver's speed.
Use the following rules to display proper messages.
If the speed is less than the speed limit, it should print "OK."
For every 5mph above the speed limit, it should give the driver one penalty point. If there is no penalty, display "OK."; otherwise, display the total number of penalty points. If the driver gets more than 6 points, the function should print "License suspended."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!