Python for Absolute Beginners
Python Installation
Setting Up Your Workspace
Before you can write Python code, you need two things: the Python interpreter and a place to write your code. The interpreter is what understands and runs your Python instructions. You can get it directly from the official source.
Go to python.org and download the latest version for your operating system (Windows or macOS). The website usually detects which one you're using and suggests the correct file.
Run the installer file you downloaded. During the installation, make sure to check the box that says "Add Python to PATH" or "Add python.exe to Path". This small step makes it much easier to run Python from anywhere on your computer later on. Otherwise, the standard installation settings are fine.
Once the installation is complete, you'll have the interpreter. Now you need a code editor. While you could use a simple text editor, it's much easier to use an Integrated Development Environment, or IDE. An IDE is software that combines a code editor with other helpful tools for programmers.
Your First IDE: Thonny
We'll use an IDE called Thonny. It's designed for beginners, so it's simple and easy to use. Some Python installers even come with it, but if yours didn't, you can download it for free from thonny.org.
Once you open Thonny, you'll see two main parts. The top part is the editor, where you'll write your scripts. The bottom part is the shell, which is where you'll see the output of your code.
Let's make sure everything is working by writing a classic first program. In the editor (the top window), type the following line of code:
print("Hello, Python!")
This line tells Python to display the text inside the quotation marks. Now, click the green "Run" button in the toolbar (it looks like a play symbol). Thonny will ask you to save the file first. Save it somewhere you'll remember, like your Desktop, and name it hello.py.
The .py extension is important. It tells your computer that this is a Python file.
After you save it, the code will run. Look at the shell at the bottom of the window. You should see the text Hello, Python! printed there. If you see that message, your setup is complete and you're ready to start coding.
Now, let's test what you've learned about getting set up.
What are the two fundamental things you need to start writing and running Python code?
During the Python installation process, what is the main benefit of checking the box labeled "Add Python to PATH"?
With your environment ready, you can now start exploring what Python can do.

