
Getting Started with Python
Looking for a way to break into programming? Don't know where to start? You are in the perfect place. The best way to learn python is by using it, but we don't know what it even is yet! Python is a high-level programming language (which just means we can focus on logic instead of telling the computer to move one pixel left or right). The basics are easier to understand and you will probably know some of the keywords just by looking at it (another example of high-level programming languages).
Installing Python
If you don't have Python installed go to Python Installation and click 'Download'. Python 3.12.x (whatever version you want, LTS (Long-Term Support) is best). Follow the instructions there. This will allow you to execute Python code on your machine. You can verify this by opening a terminal:
- Mac: use the spotlight search (cmd + space) and type 'terminal.'
- Windows press the Windows key and type cmd to open Command Prompt. If we then type
python --version
This should respond with something like "Python 3.12.x", any version is fine.
Explaining the Python Shell
Once you have Python downloaded, you are able to execute python code. Now the fun part is learning, what did you just install? Let's start with a shell, a shell is an "interactive environment where users can write, test, and debug Python code in real time." I hate that definition. It's much easier to just think of it as the place where all the code you write will run from. It's the same idea as when you open Command Prompt or Terminal on Mac. A shell is a very important principle in computing.
So let's open a python shell and execute some commands for fun. First type
python
This lets our machine knows we want to talk to Python, so it drops us in a "Python Shell." Typing
exit()
Will take you back to your terminal.
You will also notice a change in the first few characters from >>> to a file path. To recap here, because this is not easy to understand but vital to conceptually understanding the basics how your computer operates, when you are in your terminal you are talking to Windows, Mac, or whatever operating system you are in. When you type 'python' it now lets you talk to python and run those commands. They are nearly identical in the sense you can talk to both via the keywords they recognize. For example, if you are in the terminal and press enter a bunch of times, then type 'cls' or 'clear' on mac all the lines will be deleted. This might be a little technical but, cls is a keyword also called a utility. It is linked to code that tells the machine to Clear-Host where host is your terminal. I don't know if that makes sense, but if you read this far like the post 😂.
I hope you could follow that because once you understand that following simple tutorials on running commands will make a lot more sense. Often you can simply type 'help' or 'man' (for manual) and you can see what commands are available.
Running Commands in the Python Shell
So it's time to write some code. This is the fun part. I've always wanted to write a hello world program, and now it's my time to shine. So lets just start with getting Python to print us 'hello world' from the shell. First we start by
python
This should put your cursor next to a new line with ">>>" at the start of the line (that's how you can tell it's a python shell). This will allow you to execute your first command with Python. Python's standard library includes print() which will simply print what you input. So a great first start is to decide a phrase like "hello world" and we can make python respond. To do this we simply type
print("hello world")
Now you should see "hello world" spit back at you. The next steps for your programming journey are more difficult sadly. I can offer a few projects that would be fun to go and research/complete here:
If you continue your programming journey I have one bit of advice: drop the ego and start from the basics, ask the stupid questions while you can because you'll regret not asking. This advice might be a little hash, but I've been doing this for half a decade and I wish this i was my approach when I started.
Thanks for reading. You are awesome!

Comments (0)
Loading comments...