Created
February 13, 2014 18:05
-
-
Save JakenHerman/8980493 to your computer and use it in GitHub Desktop.
caught_speeding on Coding Bat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'Jaken' | |
| def caught_speeding(speed, is_birthday): | |
| if is_birthday and speed <= 65: | |
| return 0 | |
| elif is_birthday and speed >= 66 and speed <= 85: | |
| return 1 | |
| elif speed <=60: | |
| return 0 | |
| elif speed >= 61 and speed <= 80: | |
| return 1 | |
| else: | |
| return 2 | |
ghost
commented
Jul 20, 2019
def caught_speeding(speed, is_birthday):
if speed <= 60 or speed <= 65 and is_birthday:
return 0
elif 60 < speed <= 81 or is_birthday and speed <= 85:
return 1
return 2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment