Introduction to Python
Table of Contents
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
- A computer that can install and run Python.
- 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
Once installed, open your Python shell. It should look something like this:
Python shell
Alternatively, you can type:
BASHpython -V
To confirm your Python version and it should look something like this:
BASHpython -V
Python 3.8.0
Hello World
Create a brand new file titled hello-world.py
. Inside the file, put this code in:
PYTHONprint("Hello world!")
If you're using Python Shell, open the file, then simply hit "Run Module" under "Run".
You should see this:
BASH>>>
================= 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!
Resources
- Managing PHP Dependencies with Composer
- Git Tutorial: Learn how to use Version Control
- How to Set Up Cron Jobs in Linux
- How to build a Discord bot using TypeScript
- Getting Started with Deno
- How to deploy a MySQL Server using Docker
- How to deploy an Express app using Docker
- Learn how to use v-model with a custom Vue component
- Getting Started with Handlebars.js
- Getting User Location using JavaScript's Geolocation API
- Using Push.js to Display Web Browser Notifications
- Getting Started with Vuex: Managing State in Vue