r/PythonLearning • • Jun 11 '25

just started learning help

Sorry for the bad image quality Having some issues rn Anyways I instaleld visual studioes and wanted to test if it works But its showing this error message Does anyone has any idea what i am doing wrong

1 Upvotes

20 comments sorted by

6

u/Haunting-Pop-5660 Jun 11 '25

That big white dot means you have unsaved changes. Unsaved changes will not be reflected by running your code.

2

u/FormalRecord2216 Jun 11 '25

Thank u soo much My baf i was doing it before saving changes

2

u/Dzhama_Omarov Jun 11 '25

Enable autosave it’s a game changer

1

u/Express-Sherbet-8478 Jun 14 '25

how i can enable it ?

1

u/Dzhama_Omarov Jun 14 '25

That’s from here

Save / Auto Save

By default, VS Code requires an explicit action to save your changes to disk, ⌘S (Windows, Linux Ctrl+S).

However, it's easy to turn on Auto Save, which will save your changes after a configured delay or when focus leaves the editor. With this option turned on, there is no need to explicitly save the file. The easiest way to turn on Auto Save is with the File > Auto Save toggle that turns on and off save after a delay.

For more control over Auto Save, open User or Workspace settings and find the associated settings:

: Can have the values: off - to disable auto save. afterDelay - to save files after a configured delay (default 1000 ms). onFocusChange - to save files when focus moves out of the editor of the dirty file. onWindowChange - to save files when the focus moves out of the VS Code window. : Configures the delay in milliseconds when is configured to afterDelay. The default is 1000 ms. If you want to customize the Auto Save functionality for specific languages or file types, you can do so from the settings.json file by adding language-specific rules.

For example, to disable Auto Save for LaTeX files:

"[latex]": {
    "files.autoSave": "off",
},

Copy

4

u/Electronic-Source213 Jun 11 '25

What do you remove the '$' character and you run "python test1.py"?

0

u/FoolsSeldom Jun 11 '25

The $ is the command line prompt on their OS command line shell.

2

u/SKPGRT Jun 11 '25

Pretty sure PowerShell does not have $ at the start of the command-line.

PowerShell itself is a language like bash, and as far as I remember it's used for variables and such

1

u/FoolsSeldom Jun 11 '25

You are right. I think the OP did indeed type that as well as python ... but the error message doesn't make it obvious that an assignment is expected. Good shout.

I was assuming, wrongly, that the OP has set their prompt to $ as you might in other shells. Oops.

4

u/Kitchen_Put_3456 Jun 11 '25

Why on earth would you take pictures of your screen with your phone instead of taking screen shots?

4

u/FoolsSeldom Jun 11 '25

Perhaps they cannot use reddit from the pc (which would be the case with many locked down devices in educational establishments)

2

u/[deleted] Jun 11 '25

After print there is a space. Try removing the space eg- print(“hello”)

2

u/Luigi-Was-Right Jun 11 '25

You don't need the $ in front of "python test1.py"

(Also make sure to save any changes before running the file)

-3

u/FuzzySloth_ Jun 11 '25

$ is there by itself. That's how the command starts.

4

u/Luigi-Was-Right Jun 11 '25 edited Jun 11 '25

No it doesn't

2

u/SKPGRT Jun 11 '25

Pretty sure PowerShell does not have $ at the start of the command-line.

PowerShell itself is a language like bash, and as far as I remember it's used for variables and such

-1

u/ninhaomah Jun 11 '25

so you go to start , search for "powershell" , what did you get ?

1

u/nirmalTheNeckBeard Jun 11 '25

Try saving the file and then running it.

1

u/FoolsSeldom Jun 11 '25
  • save the file before trying to run your code (and then setup autosave)

  • are you using Visual Studio (Community Edition) or Visual Studio (VS) Code? Very different products - as a beginner you are better off with the latter, and I expect that is what you are using

  • if possible, please post screen shots rather than photographs - appreciate you may not be able to access reddit from the PC though if it is not your computer

  • you can also share code in post (use markdown mode in the post/comment editor window and put an additional 4 spaces in front of every line of code)

  • you can also share code using a paste service like pastebin.com or a git repository such as github.com - you can include additional information, not just code, such as error messages

1

u/Shot_Visit_4843 Jun 11 '25

I started learning python today too bro good luck to you btw