Jul-16-2019, 02:19 AM
(This post was last modified: Jul-16-2019, 02:20 AM by BlackList96.)
I am a beginner in python programming. Kindly help me to sort out the error. When I write the below code in IDLE it is giving me the right answer. But when I write it in Visual Studio Code editor it is giving me an error given below.
def add(x, y): print("Sum= ", (x+y)) add(5,3)
Error:C:/Users/user/AppData/Local/Programs/Python/Python37-32/python.exe c:/Users/user/Desktop/test.py
File "<stdin>", line 1
C:/Users/user/AppData/Local/Programs/Python/Python37-32/python.exe c:/Users/user/Desktop/test.py
^
SyntaxError: invalid syntax
I have already run very basic codes in VSCode but still getting this error for this code. Please explain this. Thanks in advance.