+ 4
elif criminals >= 5:
Look at this line, what does it say? Is 10 great than 5? Yes, so any value greater than 5 will give you "Help me Batman".
Have you looked up and/or in an if statement? Check it out đ
+ 3
You need to use a logical operator like....
>= 5 and <=10
...and then use elif and also indentation of at least two spaces.
+ 3
Naina Kapoor ,
>> please link your current code here, since we need to see what the issues are. <<
using `elif` alone will not help us, we also need to check / modify the conditional statements.
sample:
let us input 6.
...
elif criminals >= 5:
...
will output `Help me Batman`, but we will get the same answer when input is 14. this is because both of the values (6 and 14) are greater or equal than 5. but input 14 should give output: `Good Luck out there!`
so try to improve the conditional.
+ 3
Naina Kapoor ,
it is just one line to modify in your current code:
criminals = int(input())
if criminals < 5:
print("I got this!")
elif criminals <= 10: # <<<
print("Help me Batman")
elif criminals > 10:
print("Good Luck out there!")
+ 3
good luck to learning python!
+ 2
Same as your post here:
https://www.sololearn.com/Discuss/3291603/?ref=app
Use elif
+ 2
You put some random spaces, like before the colons and between the last print and ().
+ 1
in first, between 5 and : there's shouldn't be spaces
in second, use elif