79160380

Date: 2024-11-05 19:04:14
Score: 1
Natty:
Report link

I did it like this, to me it seems easier to read

def caught_speeding(speed, is_birthday):
   value = 0
        
   if is_birthday:
       speed -= 5
   if speed >= 81:
       value = 2
   elif speed >= 61:
       value = 1

   return value
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Orwell