Introduction to Python

Introduction to Python

Python is a general-purpose, object-oriented and high-level programming language. What this means is that it can and is used in a wide variety of different applications, you can structure your code with objects which helps maintain readability, and because it is a high-level language, it abstracts away a lot of the details we don't need to worry about.

Because of this, Python allows the programmer to focus on writing code and it can handle the rest.

Prerequisites

  1. A computer that can install and run Python.
  2. A desire to learn how to code!

With that being said, let's get started!

Installing Python

If you already have Python installed, you can skip this section. Otherwise, install the latest version of Python 3.

Head over to the downloads page to get your copy.

Python downloads page
Python downloads page

Once installed, open your Python shell. It should look something like this:

Python shell
Python shell

Alternatively, you can type:

	
    python -V
	

To confirm your Python version and it should look something like this:

	
    python -V
    Python 3.8.0
	

Hello World

Create a brand new file titled hello-world.py. Inside the file, put this code in:

	
    print("Hello world!")
	

If you're using Python Shell, open the file, then simply hit "Run Module" under "Run".

You should see this:

	
    >>>
    ================= RESTART: hello-world.py ================
    Hello world!
    >>>
	

If you see the words printed, you have everything you need to begin this class on Python!

Let's get started with Python!
Let's get started with Python!

Resources