0

indentation problem in python code..plz help error in line 7

https://code.sololearn.com/cLMdDK0b2125/#py

5th Apr 2019, 5:55 PM
Rahul guha
Rahul guha - avatar
2 Respostas
+ 1
The line after "if" has to be indented and there has to be some kind of statement that is executed if the condition is True: if N > 100 : print('n is > 100') elif N % 2 !=0 : print("Weird") "elif" has to be on the same indentation level as "if". There's a space before the first elif in your code that has to be removed. The condition elif N % 2 ==0 and range(2,6) doesn't make sense. What are you trying to do? Check if N is even and in the range 2-5? Then use "if N % 2 == 0 and N in range(2, 6)"
5th Apr 2019, 6:06 PM
Anna
Anna - avatar
0
Thanks
7th Apr 2019, 6:29 PM
Rahul guha
Rahul guha - avatar