Python Programming Fundamentals
Introduction to Python
What is Python?
Python is a high-level programming language known for its clear syntax and readability. Created by Guido van Rossum and first released in 1991, its design philosophy is all about writing code that is easy to understand, both for yourself and for others who might read it later.
Think of it as a language that prioritises clarity. Instead of using complex symbols and rigid rules, Python often resembles plain English. This makes it a popular choice for beginners dipping their toes into programming for the first time.
But its simplicity doesn't limit its power. Python is used everywhere, from building websites and automating repetitive tasks to conducting complex data analysis and developing artificial intelligence.
The Zen of Python
Python's core principles are summed up in a collection of 20 aphorisms known as "The Zen of Python". While you don't need to memorise them, they give you a sense of the language's spirit. You can actually see them for yourself by typing import this into a Python interpreter.
Beautiful is better than ugly. Simple is better than complex. Readability counts.
This philosophy means that Python code is often shorter and more expressive than code in other languages. The goal is to let you focus on solving problems, not on fighting with the language's syntax. It’s a practical approach that values clarity above all else.
Getting Set Up
Before you can start writing Python code, you need to install the Python interpreter on your computer. This is the program that reads your Python code and carries out its instructions. You can download the official installer for Windows, macOS, or Linux directly from python.org.
While you can write Python code in any plain text editor, most programmers use an Integrated Development Environment, or IDE. An IDE is a software application that combines all the tools you need for programming into one place.
IDE
noun
An Integrated Development Environment is a software suite that consolidates basic tools required to write and test software. This typically includes a code editor, a compiler or interpreter, and a debugger.
For beginners, we recommend Thonny. It's a simple, lightweight IDE designed specifically for learning Python. It comes with Python built-in, so you don't need a separate installation. It has a very clean interface and provides helpful features like a debugger that lets you step through your code line-by-line to see how it works.
Your First Program
Let's write the traditional first program: "Hello, World!". Open Thonny. You'll see a main window for writing code and a smaller window at the bottom called the "Shell". The shell is where you can type Python commands directly and see immediate results. It's great for quick experiments.
In the main code editor window at the top, type the following line:
print("Hello, World!")
This code uses the built-in print() function to display the text inside the parentheses on the screen. The text itself, "Hello, World!", is called a string, and you must enclose it in quotation marks.
Now, click the green "Run" button in the toolbar. Thonny will ask you to save the file. Give it a name like hello.py (the .py extension is important) and save it. Once saved, the program will run, and you should see Hello, World! appear in the shell at the bottom. Congratulations, you've just run your first Python program!
What is the primary design philosophy of the Python programming language?
What is the purpose of the Python interpreter?
You've taken the first crucial steps: understanding what Python is, setting up your environment, and running code. Now you're ready to learn the fundamentals of the language.


