Learning Python - step by step - 1 - installation

/ #Python

Python can be used for a wide variety of things. Everything from small scripts, to websites, games and applications. In this step by step guide, I'll teach you everything you need to know to get started with Python.

I'm going to go through / build this article like I don't know Python at all. This way it might feel more natural in a way that you learn the language together with me.

There's a lot of ways to learn programming and I hope that this will help you. Let's start :-)

Installing Python (skip if you're on a Mac)

If you haven't already installed Python on your computer, you can go here https://www.python.org/downloads/windows/ to download it. Choose the latest stable version. When you have downloaded the file and installed it, we can continue to the next step to confirm that we have the correct version of Python.

Check the Python version

Open up your command line, type "python" and hit enter. You should see something like this:

$ python
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 23:03:10) [MSC v.1916 64 bit (AMD)] on win32
Type "help", "copyright, "credits" or "license" for more information.

The text will be a little bit different from mine depending if you're on Mac OSX or Windows, type of computer etc. But the most imporant part is the first numbers (3.8.2). Don't worry if you have a sligthly older or newer version than mine (as long as it's not Python 2, because there's is a couple of differences).

Before I continue, I just want to say that when you typed "python" in your command line and hit enter, you started something called a "python interpreter". We can play around with python code here and do all sorts of fun things. Most of the times you'll probably want to keep code in a separate file, but it's nice for small things you want to test.

Now that we know that we have Python installed, we can start learning some code :-)

Before we continue to the code, let's just try one thing in the interpreter. Type the code below, hit enter and see what happens.

>>> print('Hello, Python!')

On the line below the code, you should see "Hello, Python!". You just used Python to write a little sentence to the screen. In the next post, we will learn more basic python.


pdcswpfmgw | Mar 20, 21 01:08

Muchas gracias. ?Como puedo iniciar sesion?

Add comment


Please log in to comment!


Subscribe to my weekly newsletter. One time per week I will send you a short summary of the tutorials I have posted in the past week.