Dear all,
utter beginner here.
Programming environment: Replit
My code (ahum…) ran smoothly for two days.
In a way it stil does, but I can no longer use the CLI as I used to.
For instance: when I call the current value of a variable, I get the following error message:
Look at the tabs for the right-hand window. See how “Console” is highlighted? This is a place where Replit simulates what a terminal window on your computer would do: a place where you can run programs, navigate through folders etc. (But it looks like it’s pretending to be a computer that runs Linux; if you use Windows then this will not be familiar to you.) I don’t use the Replit website at all, so I’m not really sure why they have a feature like this; it’s probably very limited.
If you click the “Shell” tab, it should give you the place where you can type Python code and have it interpreted one statement at a time, instead. Unfortunately, the terms used here are not very standardized. I can easily argue for applying them the other way around, even.
But in the long run, I would recommend learning the following skills, that I consider fundamental:
Install Python locally (Linux and Mac computers will generally come with a version of Python already installed, but it’s better if you learn about this anyway; you can get a more up-to-date version, and the “system Python” is often protected against changes for security reasons)
Understand terminal/command-line windows, and the command syntax for them
Understand that the command line can be scripted, and pick up some basics (for Windows, this means “batch files” that normally have a .bat extension. For Linux and Mac, this means using some kind of “shell” language; there are many options; the most popular/default is “bash”, and the most bare-bones is “sh”)
Edit Python source code in a text editor (you can use a proper IDE if you want, but it’s not necessary at all, and I think a plain text editor helps focus on learning the language and the editor individually)
Run Python code at the command line
Use the command line to make virtual environments for Python, and understand what that entails
Learn the basics of a source control system, such as Git, to keep track of changes to source code and have a way to undo larger mistakes
I’ve for example used it to run top, to pip-install some module that they didn’t install automatically (they usually do), and to download files from the web with wget.
I like it a lot, btw. Good for safely playing around with code from Stack Overflow questions or so when people are using third-party packages. Replit auto-installs pretty much everything you import. I don’t know any other sites where you can use third-party packages. Their Android app also works quite well. (All that is available in the free version as well, I’m just paying to have private repls and to have more speed.)