Noob here. If else on Vscode not working. /u/SnoozeWalrus3221 Python Education

Just trying to learn if else but i keep on getting a syntax error. I wrote the below code in the text and pressed shift+enter to run each line. Can anyone help? a=5 b=10 if (a>b): print(a) else: print(b) Output: >>> a=5 >>> b=10 >>> if (a>b): ... print(a) ... else: ... print(b) ... File "<python-input-16>", line 3 else: ^^^^ SyntaxError: invalid syntax 

submitted by /u/SnoozeWalrus3221
[link] [comments]

​r/learnpython Just trying to learn if else but i keep on getting a syntax error. I wrote the below code in the text and pressed shift+enter to run each line. Can anyone help? a=5 b=10 if (a>b): print(a) else: print(b) Output: >>> a=5 >>> b=10 >>> if (a>b): … print(a) … else: … print(b) … File “<python-input-16>”, line 3 else: ^^^^ SyntaxError: invalid syntax submitted by /u/SnoozeWalrus3221 [link] [comments] 

Just trying to learn if else but i keep on getting a syntax error. I wrote the below code in the text and pressed shift+enter to run each line. Can anyone help? a=5 b=10 if (a>b): print(a) else: print(b) Output: >>> a=5 >>> b=10 >>> if (a>b): ... print(a) ... else: ... print(b) ... File "<python-input-16>", line 3 else: ^^^^ SyntaxError: invalid syntax 

submitted by /u/SnoozeWalrus3221
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *