Sometime ago I began tinkering with Python a bit by installing it on an old XP machine.
I noticed that it installed a 'command line' and a 'GUI'. Both of these seem to be the same thing except one is in a DOS window and the other is an actual Window. In both cases, it seems typing print("Hello World") gets 'Hello World' printed on the screen, but seems it's not a line-by-line list of code that I can save.
Using Notepad++ allows me to type multiple lines of code, save it as 'file.py' and, if I click on it, will execute. Unless I type #input('Press Enter to Exit...') at the end, the window opens and closes at the blink of an eye.
Up to now, think I'm doing things correctly. The problem seems to be, when I type many lines of code (ideally five or six because I'm just a beginner), and a line or lines contain an error, all I get is the flash of a window executing the program.
The little C that I know involves something like Visual Studio, compiling, and, if an error exists, it will report which line(s) have errors without successfully compiling. Obviously it's not always an ideal error statement, but it helps know where the program is having issues.
I'm looking for some initial guidance to understanding the setup for Python or how to type code and know if I'm typing errors. Up till now, I've placed the #input('Press Enter to Exit...') statement after a line, run the program, if the window doesn't blink open and then close, I move the statement after the next line, so on and so on.
Obviously an easier way must exist. Also, after I create a file.py, how do I make it so it can't be edited? Again, with C, it's compiled, so you can't really take the .exe and see the list of C code.