If you want to learn to program with Python using this tutorial, you need to try out the code examples. You can use a website like repl.it, but I highly recommend installing Python. That way you don't need to open a web browser just to write code, and you can work without an Internet connection.
It doesn't matter which operating system you use because Python runs great on Windows, Mac OSX, Linux and many other operating systems. However, installing and launching Python are done differently on different operating systems, so just follow your operating system's instructions.
Let's get started!
Installing Python on Windows is a lot like installing any other program.
-
Go to the official Python website.
-
Move your mouse over the blue Downloads button, but don't click it. Then click the button that downloads the latest version of Python.
-
Run the installer.
-
Make sure that the launcher gets installed and click Install Now.
At the time of writing this, Macs don't come with a Python 3 and you need to install it yourself. It should be like installing any other program, but unfortunately I don't have better instructions because I don't have an up-to-date Mac and I have never installed Python on a Mac. If you would like to write better instructions, tell me.
You already have Python 3, there's no need to install anything. You may also have Python 2, but don't try to remove it. Some of the programs that came with your operating system are probably written in Python 2, so removing Python 2 would break them.
Next we'll learn to run Python on a PowerShell or terminal. There are several other ways to run Python, but if you learn this way now it's going to make things easier later.
-
Open a PowerShell from your start menu or start screen.
-
Type
py
and press Enter. You should see something like this:
-
Open a terminal. How exactly this is done depends on your operating system, but most operating systems have some way to search for programs. Search for a program called terminal and launch it.
-
Type
python3
and press Enter. You should see something like this:Your terminal probably looks different than mine, it's OK.
Now you can type exit()
and press Enter to get out of Python. Or you
can just close the PowerShell or Terminal window.
Now you should have Python installed, and you should be able run it.
If you have trouble with this tutorial, please tell me about it and I'll make this tutorial better, or ask for help online. If you like this tutorial, please give it a star.
You may use this tutorial freely at your own risk. See LICENSE.