Setting working directory

Hi everyone, I am really new to this community. I am really not sure if I can ask this question here or not but please let me know if I should not ask this here. Here are folloing questions

  1. How to run code on IDE or python .py files? I am unable to run codes on them.

  2. I read somewhere that quit() is a commend which will quit IDE or python file. But that is not working on my MacBook. Can anyone help me in this rergards

  3. I am using visual studio in MacBook. So while learning python I am trying to run the code it always forgets its working directory, Is it possible to set a fix working directory folder in python whenever I open any file with extension .py in visual studio?

Use exit()

Thanks for your reply, Could you please answer other both questions?

In VS Code you can “open file,” “open folder,” or “open workspace.” The easiest way to run a program from VSC is to click the arrow button in the top-right corner, assuming it has an appropriate interpreter configured.

Thanks for your reply

By appropriate interpreter you mean to say the selection of below 3 options if I am not wrong?

  1. Run Python File
  2. Run Python File in Dedicated Terminal
  3. Debug Python File

Please correct me if I am wrong.

I am getting a different set of options when I am clicking there, Not sure why