0
Else is not working on my Python pc...
That's what happened: x=4 if x==5: print("Yes") else: SyntaxError: invalid syntax
3 Answers
+ 2
x=4
if x==5:
print("Yes")
else:
print("No")
if & else should align in same column!
+ 1
You must align the else statement the same as if like so:
x=4
if x==5:
print ("yes")
else:
SyntaxError: invalid syntax
- 1
byeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee