Skip to content

Introduction to Python Programming

This course provides a broad overview of Python programming, focusing on the language's key features. It is not an exhaustive tutorial, but will introduce you to the essential concepts. For more detailed learning, numerous free Python tutorials are available online.

Hello World

Now that we have covered the foundational topics earlier on, let's dive into your first python program.

First, let's create a directory. You can name it anything you want. For this tutorial, we will name it python-tutorial.

I tend to keep all my programming projects in ~/Developer/. I suggest you group all your coding projects into a single directory.

Bash
mkdir -p ~/Developer/python-tutorial
cd ~/Developer/python-tutorial

You can open this directory in VSCode by running the following command:

Bash
code .

Next, create a file named hello.py and open it in your favorite text editor.

hello.py
print("Hello, World!")

To run this program, open your terminal and navigate to the directory where you saved the file. Then run the following command:

Bash
python hello.py

You should see the following output:

Bash
Hello, World!

Congratulations! You have just written your first Python program. 🎉