Introduction to this Course (Python)
Welcome! In this course, you will learn the python programming language. Python is a high-levela, general purposeb programming language created in 1991. There are multiple editions of python; however, for this we will be using the newest edition Python3.
Why Python?
Python is know for its simplicity, being a high-levela, general purposeb programming language allows both ease of learning and flexibility in its use. Along with this, Python has a large user base, in fact, it is one of the most used programming languages.
Python is also used in a variety of career fields such as:
- Data Science
- Web Development
- Machine Learning
- Cybersecurity
Python is a great choice if you are learning to program and do not know what to choose. However, if you already have a plan on what you would want to do (for example, Web Development), I would recommend starting with HTML, CSS, and JavaScript (we currently do not cover them, SORRY!)
What does python look like?
This is a sample code for the python programming language. Sample code will also be provided within the lessons. You are able to run them by clicking the "run" button. You can also edit the examples in certain lessons.
print("Hello, World!")
Installing and using python
Although we provide a editor within this website, we also recommend installing python locally, especially as you continue to learn.
Installation
- Windows
- Go to the following link and download the latest version of python.
- Run the installer and make sure to check the box that says "Add Python to PATH", then continue with the default settings.
- Once complete, run
python --version
within a command prompt. If the version that it returns is correct then it has been installed correctly.
- Apple
- Go to the following link and download the latest version of python.
- Run the installer and continue with the default settings.
- Once complete, run
python3 --version
within a terminal. If the version that it returns is correct then it has been installed correctly.
- Linux
- You likely have python already installed. You can check by running
python3 --version
within a terminal. If the version that it returns is correct then it has been installed correctly. - If it is not installed, you can install it by running
sudo apt install python3
within a terminal.
- You likely have python already installed. You can check by running
Creating your first program
- Open a terminal (command prompt, etc.) on your computer and choose a appropriate directory.
- Create a new file
<name>.py
(for example,hello.py
). - Open the file in a text editor (VSCode, Notepad++, etc.) and add the following code:
print("Hello, World!")
- Save the file and return to the terminal.
- Run the file by typing
python <name>.py
(for example,python hello.py
). You should see the output ofHello, World!
.
Conclusion
I hope that you are excited to learn about python! Please reach out to me if you need any help!
Definitions
a - A high purpose language is one that is defined as a language that more human readable and easier to learn.b - A general purpose language is just one that can be used for multiple purposes such as web development, data science, and machine learning (in python's example)