Thursday, 4 July 2019

Python Features

Features of Python:

1.  Simple and easy to learn.
Python is a simple programming language. When we read the Python program, we can feel like reading an English statement.

The Python syntax is very simple.

Let's see C language example program 

#include<stdio.h>
void main()
{
 printf(“Good afternoon”);
}

Output:
Good afternoon.

Java Program:

import java.lang.*;
class First
{
 public static void main(String args[])
 {
   System.out.println(“Good afternoon”);
 }
}

Python Example Program:

print(“Good afternoon”)

2.  Python is open source (Free software):

We can use Python software without any license and it is a free software.
We can download the code based on our requirement and we can customize based on our requirement.

3.  Python is high-level programming language:
Programming languages are two types: 1. Low level (2.) High-level programming language.
A low-level programming language uses machine level code instructions to develop a program. These instructions directly interact with the CPU. Machine level and assembly languages are called low level.

Example: Machine level example: 0’s and 1’s

High-Level Programming Language:  It is just like an English like words to develop a program (applications) These high-level languages are easy to learn and use.

Ex: 
c++,c, java, python,PHP,….etc
Python also uses English words in its program.
Example: print(“Good afternoon”)

4.  Python is a Platform independent:
When a python program is compiled(translated) using python compiler(translator), it generates byte code. Python byte code represents a fixed set of instructions that run (execute) on all the operating systems and hardware.\
1. 
Portability:
Python programs are portability. I.e we can migrate from one platform to another platform very easily. Python program can give the same result(Output).
2. Python supports procedure-oriented and object-oriented.
Procedure-oriented was taken from C language. And Object Oriented approach was taken from Java and C++.

3.  Python is Interpreted.

Python inbuilt contains Interpreter. While you are installing the python software, an interpreter will be available.
No need to compile (translating from Python code into machine level). Automatically we can see the output.

4.  Extensible: 
We can use other languages programs in Python. The main advantages of this approach are: (1.) We can use already existing code (Non-python code) (2.) we can improve the performance of the application

5.  Embedded: 
we can use Python programs in any other programs.

6. Database connectivity:

Limitations of Python:
1. We can not use as a mobile application
 Execution point of view, a little bit slow compared to c language. Because python is interpreted language.

Next Topic:  Applications of Python
Previous topic: Python Introduction
You may like the below topics:

PVM
How to install Python

1 comment:

Files with Exception handling

#Ask the user to take two input integer values var a,b try:     a=int(input("enter any integer value:"))     b=int(input(...