English, asked by Srinivasrao24631, 9 months ago

Write a function for checking the speed of drivers

Answers

Answered by maryamkincsem
0

The function used for checking a car's speed needs a speed parameter.

Explanation:

  • If the speed is less than the required or mentioned speed according to the area it will print "ok".

  • In other cases, for every 5 above the required speed, it will give the driver one demerit point and will print the number of demerits points

  • For instance, is the required speed is 55 and the driver's speed is 80, it will print "points 5".

  • If the driver will surpass 12 points his license will be suspended.
Similar questions