WHAT IS PYTHON

 



PYTHON:- It 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.

Ø  It  is easy to learn yet powerful and versatile scripting language, which makes it attractive for Application Development.

Ø  It  supports multiple programming pattern, including object-oriented, imperative, and functional or procedural programming styles.

Ø  It  makes the development and debugging fast . because there is no compilation step included in Python development, and edit-test-debug cycle is very fast.

Ø  It is dynamic in nature because it allocates or remove the memory allocation. And We don't need to use data types to declare variable. It directly assign any type of value within variable.  

Features  of PYTHON :-

Ø It supports object-oriented programming, procedural programming approaches and provides dynamic memory allocation.

Ø It is easy to learn as compared to other programming languages. Its syntax is straightforward and much the same as the English language. There is no use of the semicolon or curly-bracket, the indentation defines the code block.

Ø It is a expressive language i.e. Python can perform complex tasks using a few lines of code.

Ø It  is an interpreted language. it means the Python program is executed one line at a time. The advantage of being interpreted language, it makes debugging easy and portable.

Ø It is a cross platform language. So it 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 is free and open source language. It is freely available on its official website www.python.org. It has a large community across the world that is dedicatedly working towards make new python modules and functions.

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

Ø It provides a vast range of libraries for the various fields such as machine learning, web developer, and also for the scripting. There are various machine learning libraries, such as Tensor flow, Pandas, Numpy, Keras, and Pytorch, etc. Django, flask, pyramids are the popular framework for Python web development.

Ø It supports GUI(Graphical User Interface) which  is used for the developing Desktop application. PyQT5, Tkinter, Kivy are the libraries which are used for developing the web application.

Ø It can embed other language into our code. 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.

Ø In Python, we don't need to specify the data-type of the variable. When we assign some value to the variable, it automatically allocates the memory to the variable at run time.

 

USE OF PYTHON-

Ø  it is used for web development.

Ø  it is used to develop GUI desktop application.

Ø  It is used for developing console-based applications.

Ø  It is used in scientific & numeric.

Ø  It is used for business applications.

Ø  It is used to developing audio or video-based application.

Ø  It is used in 3D CAD applications.

Ø  It is used to develop enterprise applications.

 

History of python:-

  • Python laid its foundation in the late 1980s.
  • The implementation of Python was started in December 1989 by Guido Van Rossum at CWI in Netherland.
  • In February 1991, Guido Van Rossum published the code (labeled version 0.9.0) to alt.sources.
  • In 1994, Python 1.0 was released with new features like lambda, map, filter, and reduce.
  • Python 2.0 added new features such as list comprehensions, garbage collection systems.
  • On December 3, 2008, Python 3.0 (also called "Py3K") was released. It was designed to rectify the fundamental flaw of the language.
  • ABC programming language is said to be the predecessor of Python language, which was capable of Exception Handling and interfacing with the Amoeba Operating System.
  • The following programming languages influence Python:
    • ABC language.
    • Modula-3

VARIABLES:-

Ø  Variable is a name that is used to refer to memory location.

Ø  variable is also known as an identifier and used to hold value.

Ø  In Python, we don't need to specify the type of variable because Python is a dynamic language and smart enough to get variable type.

Ø  Variable names can be a group of both the letters and digits, but they have to begin with a letter or an underscore.

Ø  Python is a case sensitive language .i.e. both lowercase and uppercase treated as different(like SUM and sum both are different).

 

IDENTIFIER NAMING:-

It is a name that is used to identify the programming element.

There are following rules to define identifier such as-

  • The tfirst character of the variable must be an alphabet or underscore ( _ ).
  • All the characters except the first character may be an alphabet of lower-case(a-z), upper-case (A-Z), underscore, or digit (0-9).
  • Identifier name must not contain any white-space, or special character (!, @, #, %, ^, &, *).
  • Identifier name must not be similar to any keyword defined in the language.
  • Identifier names are case sensitive; for example, Vikas, and VIKAS is not the same.
  • Examples of valid identifiers: a123, _n, n_9, etc.
  • Examples of invalid identifiers: 1a, n%4, n 9, etc.

DATA TYPE:-  it shows the nature of variable or data like int, char, float…etc.

It defines what kinds of value is to be stored inside the variable.

Python provides the type() function to know the data-type of the variable.

In python there is no need to specify the data type before the variable name.

a=10

b="Hi vmsm"

c = 10.5

print(type(a))

print(type(b))

print(type(c))

in above For example it is clear that there is no need to declare data type.

There are following data type in python such as-

1.    Number( integer, float, complex number)

2.    Dictionary

3.    Boolean

4.    Set

5.    Sequence type(String, list, tuple)

v Number:- it stores numeric values.

Ø  Integer, float, complex number belongs to a number data type.

Integer :- it stores only integer value of any length. because python doest not provide any restrictions on length.


Comments

Popular posts from this blog

HTML

Administration of the Internet

FUNDAMENTAL OF COMPUTER