Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Kindly explain this error
#1
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.
Reply


Messages In This Thread
Kindly explain this error - by BlackList96 - Jul-16-2019, 02:19 AM
RE: Kindly explain this error - by Yoriz - Jul-16-2019, 05:26 AM
RE: Kindly explain this error - by millpond - Jul-16-2019, 05:32 AM
RE: Kindly explain this error - by perfringo - Jul-16-2019, 10:00 AM
RE: Kindly explain this error - by snippsat - Jul-16-2019, 12:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Shocked kindly support with this dropna function not working gheevarpaulosejobs 2 662 Jul-24-2023, 03:41 PM
Last Post: deanhystad
  Kindly asking for help with Pywinauto louloulou 0 2,014 Mar-05-2020, 06:55 PM
Last Post: louloulou

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020