Learn Python: The Fundamentals

Running Python in Your Browser

Alright, let’s stop talking about Python and actually run some code. And the cool part? You don’t even have to install anything yet. If you just want to get started quickly, you can use our built-in interpreter right here in your browser. No setup, no downloads — just code and go.

Try it out below by tweaking the message inside the print function:

 


# Try changing the message inside the print function
print("This is our inbuilt interpreter!")

Installing Python

If you want to run Python on your own computer, here’s the good news — it’s totally free, and it works on Windows, macOS, and Linux. Just head over to python.org/downloads and you’ll see a big, friendly “Download” button. Click it, and it’ll automatically give you the right version for your system. Easy.

 

Using Windows? There’s one small step you don’t want to miss. During installation, look for a little checkbox that says “Add Python to PATH.” Tick that box. It’s like plugging in a power cable — without it, Python’s installed but your system won’t know how to find it.

 

If you’re on a Mac, the installer will walk you through the steps smoothly. Linux folks, chances are Python is already installed — but we’ll check just to be sure everything’s up to date.

 

Once Python is installed, let’s make sure it’s working. Open your terminal (Command Prompt on Windows, Terminal on Mac or Linux) and type:

python --version

 

If you see a version number pop up, you’re good to go. If you get an error, don’t worry — it just means your system can’t find Python yet, and that usually means the PATH setting needs to be fixed. We’ll walk through how to sort that if needed.

 

Now, Python comes with a basic editor, but we’re going to set you up with something much more useful — Visual Studio Code, also known as VS Code. It’s free, works everywhere, and has amazing support for Python.

Head over to code.visualstudio.com, download it, and get it installed on your system.

 

Once you’ve got VS Code running, open the Extensions view (look for the little square icon on the side) and search for “Python.” Install the official Python extension. It’ll give you helpful features like syntax highlighting, smart suggestions, and a one-click way to run your code.