a guest Mar 25th, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. driver_speed = int(input("Driver's speed\n"))
  2. demerit_point = []
  3. point = 1
  4. if driver_speed < 70:
  5.     print("Ok")
  6. else:
  7.     NULL
  8. if demerit_speed % 5 => 15:
  9.     demerit_point.append(1)
  10. print(demerit_point)
  12. Write a function for checking the speed of drivers. This function should have one parameter: speed.
  13. If speed is less than 70, it should print “Ok”.
  14. Otherwise, for every 5km above the speed limit (70), it should give the driver one demerit point and print the total number of demerit points. For example, if the speed is 80, it should print: “Points: 2”.
  15. If the driver gets more than 12 points, the function should print: “License suspended”
  17. (I was thinking about adding a len statement to count points and add if statements to it if >=15)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand