0
Why is my code showing syntax error. What is the mistake.
5 Answers
+ 5
Your indentation is out of order.
Look here and learn how to do it:
https://code.sololearn.com/cT5BRIbkia21/?ref=app
+ 2
Your else statement at line 9 wasn't properly indented.
https://code.sololearn.com/cADf974L3keU/?ref=app
+ 2
Yes it is easy
+ 1
num=42
if num==30:
print("num is not 42")
else:
if num<=60:
print("maybe")
else:
if num==42:
print("yes")
Here last else statement is used without previous if
maybe you are trying to do this
num=42
if num==30:
print("num is not 42")
else:
if num<=60:
print("maybe")
else:
if num==42:
print("yes")
now last else has a previous if ,
+ 1
Honfu, arnesh and abhey thank u all for your help in always mistakes in these minor things.