+ 1

Else code isn't working in python 3.6 it says syntax error?

Python 3.6

16th Feb 2017, 2:06 AM
Vishwajeet Sharma
Vishwajeet Sharma - avatar
5 ответов
+ 2
i used the code from solo learn it says syntax error
16th Feb 2017, 2:19 AM
Vishwajeet Sharma
Vishwajeet Sharma - avatar
+ 1
the author probably made an error in the syntax... try this.... x=15 y=20 if x>10 or y>15: print ("Larger than 10") elif x>10: print("Shorter than 10") elif 4>x: print ("4 is not larger than X")
16th Feb 2017, 3:06 AM
Paul Millr
Paul Millr - avatar
+ 1
when i wrote elif it highlited in red and in bottom it says Syntax error:invalid syntax
16th Feb 2017, 4:48 AM
Vishwajeet Sharma
Vishwajeet Sharma - avatar
+ 1
double check you are in python environment... sounds like you could be in another environment.
16th Feb 2017, 4:50 AM
Paul Millr
Paul Millr - avatar
0
then you made a syntax error. No code, no help for an error.
16th Feb 2017, 2:09 AM
Amaras A
Amaras A - avatar