A Beginners Guide to Python Progamming Language (Part 1).
Photo by Artturi Jalli on Unsplash
Whether you’re a coding novice, a Python explorer, or just curious, this guide is made for you. In this guide, you’d learn how to install python to your local machine. I would be using the Windows OS.
What is Python?
Python is a high level, general purpose programming language which is known for its readability and versatility. It was created by Guido van Rossum and was first released in 1991. What’s intriguing is the name he chose — Python — derived not from the reptile but as a nod to his favorite comedy group, “Monty Python.”
Python supports multiple programming paradigms, including procedural, object-oriented, and functional programming, making it suitable for a wide range of applications. Its syntax, almost conversational in nature, makes coding an experience akin to plain English. This simplicity, coupled with Python’s adaptability, positions it as a go-to language for real-world applications spanning web development, data analysis, machine learning, and more.
Over the decades, Python has evolved through various versions — 1.x, 2.x, and the current 3.x. We may have python 4.x in the future, who knows?
Key Concepts of Python
- Variables: Containers storing values.
- Data Types: Numbers, strings (text), booleans (True or False).
- Input/Output: Management of data flow.
- Boolean Operators: AND, OR, NOT for decision-making.
- Classes: Templates for creating objects.
- Conditions: Decision-making in the program.
- Loops: Handling repetition.
- Lists: Ordered sequences of items.
- Strings: Characters enclosed in quotation marks.
- Functions: Pieces of code performing specific tasks.
- Libraries: Repositories of pre-written code for reuse.
Installing Python
To install python, we would download the python installer from python’s offical website https://python.org .
https://python.org — Home page
Hover on Downloads in the navigation menu
Click on Python 3.12.1 — this is the current stable version of python released as at the time of writing this article — the python installer would start it’s download on your machine.
Locate the Installer in your Downloads folder on Windows explorer.
Double click on the installer to run it. The Setup Wizard would appear.
Make sure to check the box that says Add Python 3.x to PATH. This makes it easier to run Python from the command line. Then click on Install Now.
The installer would copy the necessary files to you computer.
Once the installation is complete, you will see a screen that says “Setup was successful.”
Next verify the installation using the command prompt. To open command prompt press Win + R then type cmd .
In the command prompt type python --version
python --version
Or
python -V
You’d see the version of python you installed Python 3.12.1 . If you get that as output, you have successfully installed python on your machine.
Installing an Text Editor
Go to https://code.visualstudio.com/ to download VS Code installer.
https://code.visualstudio.com/ — home page
Click on Download for Windows to download the installer. When the download is completed, double click on the installer to start the installation to your machine.
Once the installation is completed, launch VS Code. We would install extensions to make our work easier.
In VS Code, we can install extensions that make our life easier while coding. Extensions transform our code editor to a powerful IDE. For Python development, we recommend installing the “Python” extension by Microsoft. This extension enriches your coding environment and provides valuable tools to streamline your workflow.
You are now set to write your first program in Python. Let’s go 🚀.
Top comments (0)