We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20ca17f commit c81023cCopy full SHA for c81023c
logic-1/caught_speeding.py
@@ -1,21 +1,19 @@
1
def caught_speeding(speed, is_birthday):
2
speed0 = 60
3
- speed1 = 61
4
- speed2 = 81
+ speed1 = 80
5
6
- if(is_birthday == "yes"):
+ if (is_birthday == True):
7
speed0 = speed0 + 5
8
speed1 = speed1 + 5
9
- speed2 = speed2 + 5
10
-
11
- if(speed <= speed0):
+
+ if (speed <= speed0):
12
return 0
13
- elif(speed1 <= speed < speed2):
+ elif (speed <= speed1):
14
return 1
15
- elif(speed2 <= speed):
+ else:
16
return 2
17
18
speed = input("What is your speed? ")
19
is_birthday = raw_input("Is it your birthday? (yes or no) ")
20
21
-print(caught_speeding(speed,is_birthday))
+print(caught_speeding(speed,is_birthday))
0 commit comments