What exactly can you do with Python?​

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++.

Python Benefits

Image Source – hackernoon

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 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().
Comparison between Python 2 and Python 3

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 :

  • TensorFlow
  • SciKit-Learn
  • Numpy
  • Pandas
  • Keras
  • PyTorch
  • LightGBM
  • Scipy

 

Applications in Python :

Application image

Image Source – JavaPoint

Basic coding in python:

Install python: https://www.python.org/downloads/

Download any editor: I suggest you download atom- https://atom.io/

Simple execution :

Python simple execution program

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

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  – 

 

Leave a Comment