If you are not into programming languages then you would associate Python with snakes and it’s the first thing that comes to your mind when you hear the word ‘Python’. However, if you associate it with a programming language then either you are an experienced developer or someone who is learning programming.
Python was created by Guido Van Rossum in 1991, and he named it after the BBC’s comedy sketch series ‘Monty Python’s Flying Circus”. So, even the programming language has nothing to do with snakes, however, it;s logo does look like two entangled Pythons. Not so appealing imagery, if you are not into snakes.
So, forget snakes and let’s talk about Python – The Programming Language. It’s a versatile and easy to learn programming language which makes writing code a lot easier.
Let’s give you an example, if you have ever written a computer program then you probably remember that most programming languages use a semicolon (;) at the end of a block of code. However, Python on the other hand rarely uses semicolons at the end of a code block.
If you are into machine learning, data-science and artificial intelligence then this is one of the best programming languages to learn. Companies like Google, Spotify and Facebook use Python. Google’s parent company Alphabet uses it to power its search engine and to process videos and analyze the data which is generated by its large user base.
So, if you want to dive into the world of Python programming then installing it on your computer is the first thing you should do. It’s actually quite easy to install and write your first program in Python. So today, we would help you to install Python and then write your first program in Python.
How to install Python on a Windows computer?
You will first have to download the latest version of python from its official website. We have given the link below.
https://www.python.org/downloads
Download the latest executable file for windows.
Then double click the executable file when download finishes. The Python Installer would start running and would load the following window when it starts. The first thing you should do is check both the checkboxes at the bottom of this window labeled, ‘Use admin privileges when installing py.exe’ and ‘Add python.exe’ to PATH‘.
Both these are necessary to install and then run python from the command line or the Command Prompt Windows in Windows.
Then click on the Install Now option at the top. You may customize the installation by clicking on Customize Installation but we would recommend sticking to the first option which installs pip and IDLE, the two things which would be needed to program in Python. PIP let’s you install/upgrade python packages from command line using commands like these
pip install package_name
pip install package_name==version
pip install –upgrade package_name
What are Packages in Python?
Packages are modules in python which are preprogrammed to add additional functions to your programs. Let’s say you want to make a program in Python to create or read QR codes then you can install a package using the pip installer which would then be used in a python program.
What is IDLE?
IDLE which stands for ‘Integrated Development and Learning Environment‘, is a tool that comes with Python to write, test, and debug Python code. However, you can use any code editor like Visual Studio Code or even Notepad or Notepad++ to write your Python programs.
Also, if you select Customize Installation Option then select all the options, but you may skip Documentation.
Select your options and click on Next. Python would start installing on your machine.
After installation you would see the following window, which has the ‘Disable path length limit’ at the bottom.
Click on this option to disable the file path character length limit in windows which limits it to ~256 characters. Disabling this limit is recommended as this would allow you to execute python programs lying inside really long and nested folders or directories.
Close the setup Windows and restart your machine and you are ready to program in Python.
Let’s start programming in Python. The article in the following link would teach you to write your first Python Program and also tell you the most common mistakes that beginners make while programming in Python.