Python tutorial: getting started

Master the basics of python programming with this beginner-friendly tutorial. learn how to install python, write your first program, and grasp fundamental coding concepts. no prior experience needed!


Welcome to the exciting world of Python programming! This tutorial is designed for beginners with no prior coding experience. We'll guide you through the basics of installing Python, writing your first program, and understanding fundamental concepts.

Python Install


Many PCs and Macs will have python already installed.

To check if you have python installed on a Windows PC, search in the start bar for Python or run the following on the Command Line (cmd.exe):

C:\Users\Your Name>python --version

To check if you have python installed on a Linux or Mac, then on linux open the command line or on Mac open the Terminal and type:

python --version

If you find that you do not have Python installed on your computer, then you can download it for free. Head over Python official website  https://www.python.org/ and download the latest version of Python that matches your operating system (Windows, Mac, or Linux). The installation process is straightforward, and there are clear instructions available on that website.


Python Quickstart


Python is an interpreted programming language, this means that as a developer you write Python (.py) files in a text editor and then put those files into the python interpreter to be executed.

1. Write Your First Program


✓ Open any text editor (like Notepad or Sublime Text).
✓ Create a new file and name it helloworld.py.
✓ Inside the file, type the following line:

print("Hello, World!")

✓ Save the file.

As Simple as that. After Saving your file. Open your command line, navigate to the directory where you saved your file, and run:

C:\Users\Your Name>python helloworld.py

The output should read:

Hello, World!

Congratulations, you have written and executed your first Python program.

Introduction to python
Previous Tutorial Introduction to python
Python Tutorial: Python Syntax
Next Tutorial Python Tutorial: Python Syntax