INTRODUCTION TO PYTHON
About Python and where it can be used
- Python is a high level, general purpose and interpreted programming language. It was released in 1991 and created by Guido van Rossum.
- It works on different OS platforms (Windows, Mac, Linux, etc.).
- Python has a very simple syntax that does not require semicolons and parenthesis.
- It relies on indentation to define scope in a function or loops.
- It can be treated as a procedural programming, functional programming and object-oriented programming.
- It can be used for:
- Web Development (Server side)
- Solving complex mathematics problems
- Machine Learning
- Deep Learning
- Computer Vision
- Data Science and much more.
- Python has two major versions available python 2 and python 3. There are a few differences between two versions:
- Division operator
- Print function
- Error handling
- Future module
In future articles we will be using python 3 as the changes made in python 3 are easier for a beginner to understand and also python 2 is going to be phased out by 2020.
Python codes can run on several IDEs(Integrated Development Environment) like Pycharm, Spyder, Python IDLE, Eclipse and we can also write python codes on several editors like Atom, Notepad++, Visual Studio Code etc.
But to run the codes in these editors we need either plug-ins or can run it on command line (Command prompt or terminal).
The best way to start coding in python is through Anaconda Distributionwhich comes with most in-demand packages, libraries and IDEs (Spyderand Jupyter Notebook) already included in it.
These are the steps to follow for downloading and installing the Anaconda Distribution on Windows:
Go to the Anaconda Distribution (download) website. Click download for Python 3.x version as we will use python 3 for our articles
Go to the Anaconda Distribution (download)
Locate your downloaded file and double click it. When the screen below appears, click Next.
Read the license agreement and click I Agree.
Then click Next for the screen below.
Note the installation location for the distribution.
This is the most important step in installation. The recommended method is not to check the box “Add Anaconda to my Path”, this means you will have to access Anaconda through Anaconda Navigator or by Anaconda prompt.
In case you want to use Anaconda in your command prompt or git bash choose the alternate method and check the box.
Once the installation is completed, click Next. Here you will get an option to install Microsoft VSCode (editor), you can install it if you wish, but it is optional.
Click on Finish.
Testing the Installation
Search the Anaconda Navigator and open it.
Then click Launch for Jupyter Notebook. It will open in your web browser but you don’t need an internet connection for that.
Then click on New and select Python 3.
A new window will open with a new jupyter notebook. You can execute your first line of code in the cell to check if its working.
Type: print(‘Hello World!!’)
Then click on “Run” or press “shift+enter” to execute.
Click on “Logout” to exit the jupyter notebook.
Congratulations!! You have successfully installed Anaconda Distribution and executed first command in python.
That’s it for this article……….I’ll we be introducing you to different topics of python in depth in the coming series of this blog.
Till then Good bye……