PYTHON THEORY 1
What is Python?
Python is a general-purpose programming language that can be used on any modern computer operating
system. It can be used for processing text, numbers, images, and scientific data and just about
anything else you might save on a computer. It is used daily in the operations of the Google search
engine, the video-sharing website YouTube, NASA and the New York Stock Exchange.
Python is an interpreted language. This means that it is not converted to computer-readable code
before the program is run but at runtime. In the past, this type of language was called a scripting
language, intimating its use was for trivial tasks. However, programming languages such as Python have
forced a change in that nomenclature. Increasingly, large applications are written almost exclusively in
Python.
About Python
Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed
to be highly readable. It uses English keywords frequently where as other languages use punctuation, and
it has fewer syntactical constructions than other languages.
❖ Python is Interpreted − Python is processed at runtime by the interpreter. You do not need to
compile your program before executing it. This is similar to PERL and PHP.
❖ Python is Interactive − We can actually sit at a Python prompt and interact with the
interpreter directly to write your programs.
❖ Python is Object-Oriented − Python supports Object-Oriented style or technique of
programming that encapsulates code within objects.
❖ Python is a Beginner's Language − Python is a great language for the beginner-level
programmers and supports the development of a wide range of applications from simple text
processing to WWW browsers to games.
http://www.edudeva.com| 9278650774,9999360340
2 PYTHON THEORY 1
N3ame - _____________
PYTHON0A1
History of Python
Python was developed by Guido van Rossum in the late eighties and early nineties at the National
Research Institute for Mathematics and Computer Science in the Netherlands.
Python is derived from many other languages, including ABC, Modula-3, C, C++, Algol-68, Smalltalk, and
UNIX shell and other scripting languages.
Python is copyrighted. Like Perl, Python source code is now available under the GNU General Public
License (GPL).
Python is now maintained by a core development team at the institute, although Guido van Rossum still
holds a vital role in directing its progress.
Important tips and links to get you started
1. Firstly understand the basics.
2. Patience is the key.
3. Practice coding.
4. Read about Python regularly.
5. Study in a group.
What is Python Platform?
The platform module in Python is used to access the underlying platform’s data, such as, hardware,
operating system, and interpreter version information.
The platform module includes tools to see the platform’s hardware, operating system, and interpreter
version information where the program is running.
Features of Python
➢ Easy-to-learn − Python has few keywords, simple structure, and a clearly defined syntax. This
allows the student to pick up the language quickly.
http://www.edudeva.com| 9278650774,9999360340
3 PYTHON THEORY 1
N3ame - _____________
PYTH PYTHON0A1
➢ Easy-to-read − Python code is more clearly defined and visible to the eyes.
➢ Easy-to-maintain − Python's source code is fairly easy-to-maintain.
➢ A broad standard library − Python's bulk of the library is very portable and cross-platform
compatible on UNIX, Windows, and Macintosh.
➢ Interactive Mode − Python has support for an interactive mode which allows interactive testing
and debugging of snippets of code.
➢ Portable − Python can run on a wide variety of hardware platforms and has the same interface on
all platforms.
➢ Extendable − You can add low-level modules to the Python interpreter. These modules enable
programmers to add to or customize their tools to be more efficient.
➢ Databases − Python provides interfaces to all major commercial databases.
➢ GUI Programming − Python supports GUI applications that can be created and ported to many
system calls, libraries and windows systems, such as Windows MFC, Macintosh, and the X Window
system of Unix.
➢ Scalable − Python provides a better structure and support for large programs than shell
scripting.
Requirements for a Good Python Coding Environment
o Save and reload code files
If an IDE or editor won’t let you save your work and reopen everything later, in the same state it
was in when you left, it’s not much of an IDE.
o Run code from within the environment
Similarly, if you have to drop out of the editor to run your Python code, then it’s not much more
than a simple text editor.
o Debugging support
Being able to step through your code as it runs is a core feature of all IDEs and most good code
editors.
http://www.edudeva.com| 9278650774,9999360340
4 PYTHON THEORY 1
Name - _____________
p PYTHON0A1
PYTHON0A1
o Syntax highlighting
Being able to quickly spot keywords, variables, and symbols in your code makes reading and
understanding code much easier.
o Automatic code formatting
Any editor or IDE worth its salt will recognize the colon at the end of a while or for statement,
and know the next line should be indented.
Advantages of python
➢ Extensive Support Libraries – It provides large standard libraries that include the areas like
String operations, Internet, web service tools, operating system interfaces and protocols. Most of
the highly used programming tasks are already scripted into it that limits the length of the codes
to be written in Python.
➢ Integration Feature – Python integrates the Enterprise Application Integration that makes it
easy to develop Web Services by invoking COM or COBRA components. It has powerful control
capabilities as it calls directly through C, C++ or Java via Python.
➢ Improved Programmer’s Productivity - The language has extensive support libraries and clean
object-oriented designs that increase two to tenfold of programmer’s productivity while using the
languages like Java, VB, Perl, C, C++ and C#.
➢ Productivity - With its strong process integration features, unit testing framework and enhanced
control capabilities contribute towards the increased speed for most applications and productivity
of applications. It is a great option for building scalable multi-protocol network applications.
➢ Extremely Scalable - Python has emerged as a scalable language compared to R and is faster to
use than Matlab and Stata. Even YouTube has migrated to Python due to its scalability that lies in
its flexibility during problem-solving situations. Skilled data scientists in various industries use
this language to develop various types of applications successfully.
➢ Python preferred over data science tools - Python becomes Pythonic when the code is written
naturally. It has many other features that attract the data science community. Being a data
science tool, Python helps to explore the concepts of machine learning in the best way possible.
Machine Learning is all about probability, mathematical optimization, and statistics, which are all
made easy by Python.
http://www.edudeva.com| 9278650774,9999360340
5 PYTHON THEORY 1
Name - _____________
PYTHON0A1
Disadvantages of python
➢ Difficulties in using other languages – The Python lovers become so accustomed to its features
and its extensive libraries, so they face problem in learning or working on other programming
languages. Python experts may see the declaring of cast values or variable types, syntactic
requirements of adding curly braces or semi colons as an onerous task.
➢ Weak in Mobile Computing – Python has made its presence on many desktop and server
platforms, but it is seen as a weak language for mobile computing. This is the reason that very
few mobile applications are built in it like Carbonnelle.
➢ Gets slow in speed – Python executes with the help of interpreter instead of the compiler, which
causes it to slow down because compilation and execution help it to work normally. On the other
hand, it can be seen that it is fast for many web applications too.
➢ Run-time errors – The Python language is dynamically typed so it has many design restrictions
that are reported by some Python developers. It is even seen that it requires more testing time,
and the errors show up when the applications are finally run.
➢ Underdeveloped Database Access Layers – As compared to the popular technologies like JDBC
and ODBC, the Python’s database access layer is found to be bit underdeveloped and primitive.
However, it cannot be applied in the enterprises that need smooth interaction of complex legacy
data.
0 Comments