Getting Started with Python
Disclaimer
While this course is intended for absolute beginners in Python, it assumes you have built a solid foundation in programming. This course is not intended to teach you how to program or think, if you’re new to programming then keep an eye, because I will be releasing a Python course for people who aren’t familiar with programming. With that being said, let’s get started.
What is Python?
Python is a high-level, interpreted programming language known for its simplicity and readability. Designed and implemented initially by Guido van Rossum and first released in 1991, Python has become one of the most popular programming languages in the world. It’s used in web development, data science, artificial intelligence, automation, and much more.
Design vs Implementation
When we say “Designed” we usually refer to the language’s specification. Guido laid down the ground rules for how the language should work and behave, how it should look like, from syntax to built-in functions and libraries.
On the other hand, “Implemented” refers to the actual code that is written to make the language work.
So Guido initially designed and implemented the language, then open sourced it to the public in 1999. Since then, the Python community has been working on the language and adding new features and libraries to both the design and the current Python implementation. This distinction is important as it led to the creation of multiple Python implementations, each for a different purpose, while following the base design that Guido had founded. This is why we hear of CPython, PyPy, Jython, IronPython, etc. CPython is the reference implementation of Python, it’s the one that most people use and we will be using in this course.
Funny
Back in December 1989 Guido wanted a scripting language that bridges the gap between shell scrips and compiled languages like C, so over the Christmas holidays he designed and implemented the first version of Python, which is what we now call CPython. This is how programmers spend their holidays!
Installing and Using Python
Before doing anything, check if Python is installed on your machine by opening the terminal and running the command:
python --versionIf you see a version like 3.14.0 (it doesn’t have to be the same as this), then it is installed, otherwise follow the steps below to install it.
Note
This course has been updated to align with the new Python version Python 3.14. which was released on October 2025. If you machine does not have the latest, then you are urged to update it.
Windows
To install or update Python, head to https://www.python.org/downloads/release/python-3140/, then click on Windows installer (64-bit). You can click on this to get a direct download link https://www.python.org/ftp/python/3.14.0/python-3.14.0-amd64.exe. Follow the instruction wizard, and you are good to go!
Linux
For Linux users, run the following commands in your terminal:
sudo apt updatesudo apt install python3.14Tip
Even if you know that I’m a good guy and would never harm you, but it is always advised “If you copy something from the internet, paste it in a notepad to make sure what you copied is in fact the same as in your clipboard”.
MacOS
For Mac users, navigate to https://www.python.org/downloads/release/python-3140/ and choose macOS 64-bit universal2 installer. You can click on this to get a direct link for the download macOS 64-bit universal2 installer.
Editor
Of course we won’t be using the notepad to write the code would we? You have three options to move forward with this course:
- VS Code
- Pycharm
- OnlineGDB
If you choose VS Code, then you must install the Python extension. Pycharm can also be used freely, it comes with Python installed out of the box. An alternative to all of them would be to use OnlineGDB.
At the end of the day, the installation of Python on your machine is cruel as we will be needing it for the exam’s code runner, which will be put on your machine.
Success
With that out of the way, let’s start with the fun parts please.
Running Python: Interactive mode vs scripts
Fire up your trusty terminal. There are two ways to run Python, either by writing a file then running it, or using the REPL. Copy the following code, into the file example.py
print("Welcome to our very first Python lesson")a = int(input("Please insert a number: "))b = int(input("Please insert another number: "))print(a, "+", b, "=", a + b, sep="")print("Have a good day!")Note
We use
pyas the file extension for Python scripts.
Now navigate to the place where you save that file, and write:
python example.pyIf everything works fine, then you should see a message, with a blinking cursor asking you to enter a number, followed by another number, and finally it gives you the sum of them.
Info
REPL stands for Run Evaluate Print Loop.
Open the terminal and write python only, you will see a blinking cursor, something similar to this:
Python 3.14.0 (tags/v3.9.13:6de2ca5, Oct 7 2025)Type "help", "copyright", "credits" or "license" for more information.>>>This is the REPL version, where it waits for us to enter something, then it evaluates it, next it prints the output (if any) and finally it asks us again. You can test it out by writing:
print("Houston, Python is running. We are ready to fly!")Comments
Comments in Python come in two flavors, single-line comments and multi-line comments.
A single-line comment is a comment that starts with #, then everything that follows it becomes a comment.
A multi-line comment is a comment that either starts with 3 double quotations and ends with them, or starts with 3 single quotations and ends with them.
# This is a single-line comment
"""This isamulti-line comment"""
'''This is another version of themulti-linecomment'''