What is Python

 Python is a general purpose, dynamic, high-level, and interpreted programming language. It supports Object Oriented programming approach to develop applications.Python's syntax and dynamic typing with its interpreted nature make it an ideal language for scripting and rapid application development.

Python supports multiple programming pattern, including object-oriented,  functional and procedural programming styles. That is why it is known as multipurpose programming language because it can be used with web, enterprise, 3D CAD, etc.

Python makes the development and debugging fast because there is no compilation step included in Python development.

Python Features :

There are many features listed below 

Expressive Language :  

It can perform complex tasks using a few lines of code. A simple example, the hello world program you simply type print("Hello World"). It will take only one line to execute.

Cross Platform Language :

Python can run equally on different platforms such as Windows, Linux, UNIX, and Macintosh, etc. So, we can say that Python is a portable language. It enables programmers to develop the software for several competing platforms by writing a program only once.

Object-Oriented Language :

Python supports object-oriented language and concepts of classes and objects . It supports inheritance, polymorphism, and encapsulation, etc. The object-oriented procedure helps to programmer to write reusable code and develop applications in less code.

Embeddable Language :

The code of the other programming language can use in the Python source code. We can use Python source code in another programming language as well. It can embed other language into our code.

Example :  Program to print Hello, world!.

# This program prints Hello, world!

print('Hello, world!')

Output

Hello, world!

In this program we have used build in print() function to print the string Hello, world!

Add two Numbers :

# This program adds two numbers

num1 = 1.5
num2 = 6.3

# Add two numbers
sum = num1 + num2

# Display the sum
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))

 Output

The sum of 1.5 and 6.3 is 7.8

Comments

Post a Comment

Popular posts from this blog

What is Java

Digital Marketing