I am unable to get the output of Python program in VS Code it is on printing the path but not running the code

Viewed 44

enter image description here

If I want to run the code of Python in VS Code terminal I am not getting the output. I tried code runner or setting environmental variables, nothing works. How can I solve this problem?

2 Answers
  • In your case, needed to save the file first; as in the picture, it is visible that the file is not saved.
    Press cntrl+s
  • To use VScode, you need to open a folder. I suppose you directly opened the VScode and wrote a program. creates a folder in your machine and opened that folder/python.py then.

thank you everyone who answered my question. my problem was solved when i added a new folder to vs code then the program started exexuting once again thank you everyone enter image description here

Related