-1

I was trying to run the def command in my "vscode" but it keeps reporting a strange error that I don't understand and needs some help with. I am showing here a simple example of what is happening.

def hello_function():
    print("yeet")

hello_function()     

After running the def command I am always greeted with this ERROR:

enter image description here

Here's the full screenshot:

enter image description here

here's the python.python.path

enter image description here

clobet
  • 11
  • 5

1 Answers1

-2

You should be careful with spaces, Python is a case sensitive programming language.

UPDATE


  • As, I saw the image I understood that the issue was not with spaces, but with the file itself. So, before running the code, SAVE the file and then run it.
  • You should add Python to the Path environment variable. Hope this guide helps. Then copy the PATH to VS Code
Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
georgekrax
  • 1,065
  • 1
  • 11
  • 22
  • I mistakingly answered my own question instead of commenting on your's, please come back. – clobet May 03 '20 at 18:12
  • You should add Python to the Path environment variable. Hope [this](https://geek-university.com/python/add-python-to-the-windows-path/) guide helps. Then copy the PATH to VS Code – georgekrax May 03 '20 at 18:31
  • thank you for sharing the link and the suggestion it really helped me fixed my problem, though I'm still confused as to how and why did it stopped working before. @georgekrax – clobet May 03 '20 at 20:48