What is Python ?

What is Python ?

Introduction to Python

Namaste coders!

In this article, we are going to discuss Python programming language.

1-removebg-preview.png

Getting Started

Well, either you know a bit about python and want to learn more or are a beginner who wants to learn from scratch. The best part is that this tutorial is structured in such a manner that a beginner can easily follow it. We will take you from the basics of python to advance concepts in a fun and engaging manner.

Python is an amazingly high-level language. It is used almost everywhere! The power of python is something that everybody is harnessing in the modern age of technology. Whether it is web development, Machine Learning, Software Development, and even Artificial Intelligence, Python has got it all.

Python Features

“Simplicity is the best” one single quote which describes python well !

  • High level language: As computer understands binary language(machine level language) which is not possible for humans to read and understand. Thus, Python which is High Level Language allows humans to easily read and write the codes.

  • Interpreted : Python is an interpreted language which means Python interpreter is required to convert python(high level language) into binary language(machine level language). Interpreter converts high level language into machine level language line by line unlike compilers as in C or C++.

  • Platform Independent: Python is a cross-platform language. It can be developed and executed in any operating system whether it is Macintosh, windows , linux or any other. -Simple: Python is very closely related to English language which makes its syntax simple and easy to understand. Also, python let’s programmer’s to write the codes in very less number of lines as compared with any other programming language.
  • Dynamic: Python is dynamically typed language which means we need not to specify the datatype of data in variable. Python interpreter understands the datatype of data as we store it. This provides dynamic nature to python unlike C,C++ or Java in which we have to statically mention datatype.
  • Indentation: This is most important feature of python and a feature which makes python unique. Python doesn’t use braces {} as in any other programming language. Python programs get structured through indentation, i.e. code blocks are defined by their indentation. Python follows 4 spaces are indentation. It is best to use tab function for indenting your code.
  • Embeddable: Python can be used within C/C++ program to provide scripting capabilities.
  • Open Source: As python is open source it means it is freely available to all along with the developer’s support. Also, one can contribute in it.
  • Rich Libraries: The biggest strength of Python is huge collection of standard library which allows developers to achieve various tasks in different fields like Pandas, Numpy and many more. Python is often described as a "batteries included" language due to its comprehensive standard library.
  • Robust & Efficient: Python includes exception handling as well as provides in-built memory management techniques.
  • Multiple programming paradigms: Python supports multiple programming paradigms, like object-oriented, imperative and functional programming or procedural.

Python History

Python is created by Guido Van Rossum ( a Dutch Programmer) at CWI in 1991 and was later developed by Python Software Foundation. It has become a widely used general-purpose, high-level programming language.

2.jfif

According to Guido Van Rossum , “Python is a high-level programming language, and its core design philosophy is all about code readability and a syntax which allows programmers to express concepts in a few lines of code.”

Many beginners and programmer’s misinterpret that python was named after a snake’s name but actually it was named after the surreal British comedy group Monty Python

Earlier Python 2.0 version was released in 2000 which was majorly revised into Python 3.0 in 2008. Now a days Python 3.6.x versions are used.

Even Python 2.7 has been ended in 2020 and no longer support is provided for it.

Python Installation

Most operating systems like MacOS, Linux comes with python pre installed but it is Python 2. Thus, to download python interpreter we will move to Python’s official site. https://www.python.org/

We will require two softwares:

  • Python Interpreter
  • Code Editor (VS Code)

Downloading Python Interpreter

4.PNG

  • Site will automatically identify your Operating System. If not then you can select accordingly.

5.PNG

  • Install the setup by clicking next-next.

6.PNG

Make sure that you check the option Add Python 3.8 to PATH and then click on Install Now.

7.PNG

Images are for reference. Version may differ.

To check the version

  • Windows: python --version
  • MAC OS: python3 --version

Python Applications

Python is almost in every domain! There are various different tasks that we can do using Python. Following are it’s applications:

  • Machine Learning: A biggest buzz in IT is machine learning which is primarily achieved using python language. Python provides various libraries like Numpy, Pandas, Matplotlib, PyTorch, SciPy and many more which makes ML a breeze.
  • GUI Applications: Python allows us to build various GUI applications whether as desktop applications using tkinter,PyQt5 or mobile applications using Kivy.
  • Web Frameworks: Python provides various frameworks like Django,Pyramid or Flask which allows developers to build websites very easily. These web frameworks arer used by top companies like Dropbox, Youtube, Reddit etc.
  • Web Scraping: One can easily scrap the data from websites using BeautifulSoup, Scrapy and Selenium.
  • Image Processing: Image processing is something which fantasised users and this can be achieved in Python using OpenCV and Pillow.
  • Automation: Automation can be easily done in python like sending automated emails or filling excel sheets. This task can be achieved using Selenium.
  • Scientific Computation: Python is widely used in scientific and numeric computing. Libraries like Pandas,SciPy,IPython are used to achieve this.
  • Business Applications: Python is also used to build ERP and e-commerce systems

Python Code Example

We will begin our Python example with the classic hello world example. We will print hello world using an interactive shell provided by Python. By typing python on command prompt it provides interactive shell which is denoted by(>>>).

9.PNG

10.PNG

Print function helps to print string as output.

The End

I hope you enjoyed the article and had a good learning experience.

Follow for more articles and keep sharing👩

Keep coding

Linkedin

hashnode blogs

Did you find this article valuable?

Support akshita garg by becoming a sponsor. Any amount is appreciated!