0

Why doesn't my code work?

It shows an error at "i" in the second line. Here is the code: i = input("What is the number of criminals?") If i<5: Print("I got this!") Elif i=>5 and i=<10: Print("Help me Batman") Elif i>10: Print("Good Luck out there!")

2nd Apr 2020, 8:20 AM
Oskar Rychtelski
Oskar Rychtelski - avatar
4 Answers
+ 6
Fix the indentation. It's very important in python. Edit : your code has a lot more problems other than indentation. not converting string to int wrong operators incorrect keywords redundant operation (not error but not efficient) i fixed your code please compare it character by character. python is case sensitive language. i = int(input("What is the number of criminals?")) if i<5: print("I got this!") elif i<=10: print("Help me Batman") elif i>10: print("Good Luck out there!") https://code.sololearn.com/crRv88lPC09M/?ref=app
2nd Apr 2020, 8:22 AM
Bhavya
Bhavya - avatar
+ 1
Update my answer
2nd Apr 2020, 8:41 AM
Bhavya
Bhavya - avatar
0
I think it still doesn't work :(
2nd Apr 2020, 8:33 AM
Oskar Rychtelski
Oskar Rychtelski - avatar
0
Thank you very much!!!
2nd Apr 2020, 8:43 AM
Oskar Rychtelski
Oskar Rychtelski - avatar