What exactly can you do with 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.
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 specialties. But what makes a language unique? What makes Python so powerful compared to other programming languages?
Python is very easy to code. Compared to other popular languages like Java and C++.
Image Source – hacker noon
Python 2 vs 3 :
Whenever a new version releases, it supports the features and syntax of the existing version of the language. However, in 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. As a Python developer, you must have sound knowledge of the best ones. Here some are :
- TensorFlow
- SciKit-Learn
- Numpy
- Pandas
- Keras
- PyTorch
- LightGBM
- Scipy
Applications in Python :
- Web and internet development (Django, flask).
- Scientific and numeric (Scipy, Pandas).
- Desktop Gui (pyqt or PySide).
- Software development (Scons).
Image Source – Java Point
What exactly can you do with Python
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 a 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
save:face.py
face.py
import cv2
face_cascade=cv2.CascadeClassifier(‘haarcascade_frontalface_default.xml’) img=cv2.imread(‘ishu.jpg’)
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
faces = face_cascade.detectMultiScale(gray,1.1,4)
for(x,y,w,h) in faces:
cv2.rectangle(img,(x,y),(x+w,y+h),(255,0,0),2)
cv2.imshow(‘img’,img)
cv2.waitKey()
For more details :
GitHub:https://github.com/ishwaryas1412/face-recognition
Try them out! Happy coding
Stay updated with Emerging Technologies and Science –