Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
26 views

1 Python Features

python

Uploaded by

LavanyaDoopati
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

1 Python Features

python

Uploaded by

LavanyaDoopati
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

Python Features:

Python provides many useful features which make it popular and valuable from the
other programming languages.
It supports object-oriented programming, procedural programming approaches and
provides dynamic memory allocation.
We have listed below a few essential features.

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.

1) Easy to Learn and Use


Python 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 the recommended programming language for beginners.

2) Expressive Language
Python 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, while Java or C takes multiple lines.

3) Interpreted Language
Python 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.

4) 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.

5) Free and Open Source


Python is freely available for everyone. 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.
Anyone can contribute to the Python community. The open-source means, "Anyone can
download its source code without paying any penny."

6) Object-Oriented Language
Python 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.

7) Extensible
It implies that other languages such as C/C++ can be used to compile the code and
thus it can be used further in our Python code.
It converts the program into byte code, and any platform can use that byte code.

8) Large Standard Library


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.

9) GUI Programming Support


Graphical User Interface is used for the developing Desktop application. PyQT5,
Tkinter, Kivy are the libraries which are used for developing the web application.

10) Integrated
It can be easily integrated with languages like C, C++, and JAVA, etc. Python runs
code line by line like C,C++ Java. It makes easy to debug the code.

12. Dynamic Memory Allocation


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. Suppose we are assigned integer value 15 to x, then we don't need to
write int x = 15. Just write x = 15.

===================================================================================
============================
Python Applications
Python is known for its general-purpose nature that makes it applicable in almost
every domain of software development. Python makes its presence in every emerging
field. It is the fastest-growing programming language and can develop any
application.

Here, we are specifying application areas where Python can be applied.

1) Web Applications
We can use Python to develop web applications. It provides libraries to handle
internet protocols such as HTML and XML, JSON, Email processing, request,
beautifulSoup, Feedparser, etc. One of Python web-framework named Django is used on
Instagram. Python provides many useful frameworks, and these are given below:

Django and Pyramid framework(Use for heavy applications)


Flask and Bottle (Micro-framework)
Plone and Django CMS (Advance Content management)

2) Desktop GUI Applications


The GUI stands for the Graphical User Interface, which provides a smooth
interaction to any application.
Python provides a Tk GUI library to develop a user interface. Some popular GUI
libraries are given below.

Tkinter or Tk
wxWidgetM
Kivy (used for writing multitouch applications )
PyQt or Pyside

3) Console-based Application
Console-based applications run from the command-line or shell. These applications
are computer program which are used commands to execute.
This kind of application was more popular in the old generation of computers.
Python can develop this kind of application very effectively.
It is famous for having REPL, which means the Read-Eval-Print Loop that makes it
the most suitable language for the command-line applications.

Python provides many free library or module which helps to build the command-line
apps. The necessary IO libraries are used to read and write. It helps to parse
argument and create console help text out-of-the-box. There are also advance
libraries that can develop independent console apps.
4) Software Development
Python is useful for the software development process. It works as a support
language and can be used to build control and management, testing, etc.

SCons is used to build control.


Buildbot and Apache Gumps are used for automated continuous compilation and
testing.
Round or Trac for bug tracking and project management.

5) Scientific and Numeric


This is the era of Artificial intelligence where the machine can perform the task
the same as the human. Python language is the most suitable language for Artificial
intelligence or machine learning. It consists of many scientific and mathematical
libraries, which makes easy to solve complex calculations.

Implementing machine learning algorithms require complex mathematical calculation.


Python has many libraries for scientific and numeric such as Numpy, Pandas, Scipy,
Scikit-learn, etc. If you have some basic knowledge of Python, you need to import
libraries on the top of the code. Few popular frameworks of machine libraries are
given below.

SciPy
Scikit-learn
NumPy
Pandas
Matplotlib

6) Business Applications
Business Applications differ from standard applications. E-commerce and ERP are an
example of a business application.
This kind of application requires extensively, scalability and readability, and
Python provides all these features.

Oddo is an example of the all-in-one Python-based application which offers a range


of business applications. Python provides a Tryton platform which is used to
develop the business application.

7) Audio or Video-based Applications


Python is flexible to perform multiple tasks and can be used to create multimedia
applications. Some multimedia applications which are made by using Python are
TimPlayer, cplay, etc. The few multimedia libraries are given below.

Gstreamer
Pyglet
QT Phonon
8) 3D CAD Applications
The CAD (Computer-aided design) is used to design engineering related architecture.
It is used to develop the 3D representation of a part of a system. Python can
create a 3D CAD application by using the following functionalities.

Fandango (Popular )
CAMVOX
HeeksCNC
AnyCAD
RCAM
9) Enterprise Applications
Python can be used to create applications that can be used within an Enterprise or
an Organization.
Some real-time applications are OpenERP, Tryton, Picalo, etc.

10) Image Processing Application


Python contains many libraries that are used to work with the image. The image can
be manipulated according to our requirements.
Some libraries of image processing are given below.

OpenCV
Pillow
SimpleITK
In this topic, we have described all types of applications where Python plays an
essential role in the development of these applications. In the next tutorial, we
will learn more concepts about Python.

-----------------------------
--> Python has two basic modes: script and interactive.

1. Interactive mode is a command line shell which gives immediate feedback for each
statement
a. Interactive mode is used when an user wants to run one single line or one
block of code
b. It runs very quickly and gives the output instantly.

2. The normal mode is the mode where the scripted and finished . py files are run
in the Python interpreter
a. Script Mode, on the other hand ,is used when the user is working with more
than one single code or a block of code.(NO.of lines)

b. It is possible to execute Python script from command line.


Python program can be written by any text editor (preferably a Python aware
text editor) and saved with . py extension.
To write basic Hello World program using IDLE, the Python IDE shipped with
standard Python distribution, open the editor choosing File->New.

Syntax:

You might also like