At some point in time, we had about as many programming languages as we could count on our fingers. Today, there are so many, and all with their own specialties. But what makes a language unique? what makes Python so powerful as compared to other programming languages?
What is Python?
Python is a general purpose, dynamic, high level, and interpreted programming language. It supports Object Oriented programming approach to develop applications. It is simple and easy to learn and provides lots of high-level data structures.
Python is very easy to code. Compared to other popular languages like Java and C++.
Image Source – hackernoon
Python 2 vs 3 :
whenever a new version releases, it supports the features and syntax of the existing version of the language, However, in the case of Python, the two versions Python 2 and Python 3 are very much different from each other.
- Python 2 uses print “hello” whereas python 3 uses print(“hello”)
- Python 2 uses xrange() is the variant of range() function for example the function range(0,3) contains 0, 1, 2.whereas Python3 uses doesn’t contain the xrange().
Image Source – http://www.differencebetween.net/
Libraries in Python:
Python is an ocean of libraries that serve various purposes and as a Python developer, you must have sound knowledge of the best ones. Here some are :
Applications in Python :
- Web and internet development (Django, flask).
- Scientific and numeric (Scipy, Pandas).
- Desktop Gui (pyqt or pyside).
- Software development (Scons).
Image Source – JavaPoint
Basic coding in python:
Install python: https://www.python.org/downloads/
Save program: filename.py
Download any editor: I suggest you download atom- https://atom.io/
Simple execution :
Are you interested in creating simple application try out Face-recognition using openCV :
At first install package in your command prompt: pip install opencv-python
Then download raw data: haarcascade_frontalface_default.xml
faces = face_cascade.detectMultiScale(gray,1.1,4)
for(x,y,w,h) in faces:
For more details :
Try them out! Happy coding
Stay updated with Emerging Technologies and Science –