Else and elif stament is not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Else and elif stament is not working

When ever I try to enter the else and elif statement Python give me result invalid syntax.

18th Sep 2017, 12:25 PM
Amit Yadav
Amit Yadav - avatar
4 Answers
+ 3
Make sure indentation is good, it's one common error trigger.
18th Sep 2017, 2:00 PM
Ipang
+ 1
Show your code,so we can see what's wrong.
18th Sep 2017, 12:36 PM
Rose Sevenyears
Rose  Sevenyears - avatar
0
That's not the problem, check your variables and operations
18th Sep 2017, 1:27 PM
NeoAbhiArc
NeoAbhiArc - avatar
- 1
elif abd if takes an argument and ends with colon( : ) else dont take any argument and ends with colon( : ) check your indentation also.. if condition1 : dance elif condition2 : if condition3: sing else : draw else : eat
18th Sep 2017, 2:02 PM
sayan chandra
sayan chandra - avatar