Python Introduction

Python Exercise Lists

Basically, programming languages split into high-level and low-level. Python is one of the high-level programming languages. Python has libraries for data loading, visualizatio, natural language processing, statistics, image processing and etc. The important python libraries used for data analysis are numpy and pandas.

Python History

The history of Python is extremely dramatic. The Python language was developed by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands. It happened during Christmas as Guido planned to spend his Christmas holiday wisely. Why it is called “Python”? Because Guido was a big fan of the ‘Monty Python’s Flying Circus’, a British comedy series in the 1970s.

The Python language was developed based on the foundation of the ABC languages. Guido believes that the Python language is not a open source and it causes Python has not been widely used despite the ABC language is very powerful.

Based on this consideration, Guido has added in a lot of features that did not exist in the ABC languages such as powerful Python libraries. The Python libraries able to help programmer in linking variety of modules (especially C and C++) together easily. Thus, Python is often called as ‘glue’ language.

What are the advantages of Python Programming Language?

No. Advantages Details
1 Simple syntax

To compare with the traditional C, C++, Java, etc., Python has less stringent requirement on the code format. User does not have to spend too much effort in writing codes.

For example, Python does not require a semicolon at the end of every statement.

2 Open source

Open source means that all users can see the source code. The programmer’s code written in Python is open source.

For example, Programmer developed a AAA system and publish online. Then the user able to download all the source code of the system and modify it accordingly to their own requirement.

The Python interpreter and modules are open source. Python users are involved to improve the performance of Python.

3 Free Users use Python to develop or distribute their own programs without paying any fees or worrying about copyright issues. Even for commercial usage, Python is free.
4 High-level language Python is high-level language. It is easier to use without worrying about the details. The structure of Languages can be seen in the Figure 1.
5 Cross-platforms Python is an interpreted language that can cross platforms. It able to be used in different types of operating systems.
6 Object-oriented programming language Python is object-oriented programming language. It is a feature that helps in developing huge programs without many restrictions.
7 Many modules Python has many modules thus programmers can use modules to fasten their program development.

Figure 1: The structure of Languages

What are the disadvantages of Python Programming Language?

No. Disadvantages Details
1 Slow speed

Slow speed is a common program with interpreted languages. Python is slow due to:

a. It “translates” the source code while running

b. It shields many low-level details

2 Difficult for encryption Unlike compiled language, source code is compiled into executable programs. Python is interpreted language which runs the source code directly, so it is difficult to encrypt the source code.

Application areas of Python

No. Application areas Details
1 Web application development

Python is also used for web development despite PHP and JS are still the mainstream language for web development. Python is gaining more momentum especially when Python’s web development framework (such as Django, Flask, TurboGears, etc) becomes mature, thus programmers can develop and manage complex web programs easily.

For example, the mod_wsgi module enables Apache to run web programs which written in Python Language.

The world’s largest video website, Youtube, is also developed using Python.

2 Artificial Intelligence

Python is the mainstream programming language in machine learning, neural networks and deep learning in the field of artificial intelligence.

Currently, the world’s best artificial learning frameworks (such as Google Tensor Flow, Facebook PyTorch, etc.) are developed based on big data analysis and deep learning which using Python programming language.

3 Web crawler The Python programming language can be used to write web crawler. Technically speaking, Python provides many tools for writing web crawlers such as urllib, Selenium and BeautifulSoup. It also provides web crawler framework called Scrapy.
4 Scientific computing Since 1997, NASA has used Python extensively for a variety of complex scientific operations. Comparing with other interpreted languages (such as Shell, Javascript, PHP), Python has quite complete and excellent libraries in data analysis and visualization such as NumPy, SciPy, Matplotlib, Pandas, etc.
5 Game development Currently, most of games use C++ to write high-performance modules such as graphical display, which using either Python or Lua to write the game logic. Lua is simpler and lightweight while Python able to support more features and data types.


More Tutorials:

Python Installation - Linux (Ubuntu)
Python Installation - Mac OS
Integrated Development Environment - IDE
Python - Basic Variables
Python - Sequence Introduction
Python - Output Formatting
Python - Escape Character
Python - Type Conversion
Python - Numbers
Python – Arithmetic Operators
Python – Assignment Operators
Python – Comparison Operators
Python – Logical Operators
Python – Precedence and Associativity Operators
Python – Bytes Type and Usage
Python – Long & Raw Strings
Python – Concatenate Function
Python – Slice Function
Python – Length and Split Function
Python – Join and Count Function
Python – Find Function
Python – Index Function
Python – Alignment Function
Python – Startswith and Endswith Function
Python – String Case Conversion
Python – Remove Specified Character
Python – Encode and Decode Function
Python – dir and help Function
Python – Input Output Introduction
Python – Basic Operation
Python – Open Function
Python – Read Function
Python – Readline Function
Python – Write Function
Python – Close Function
Python – Seek and Tell Function
Python – Pickle Module
Python - File Input Module and Linecache Module
Python - Pathlib Module
Python - Pathlib Module
Python - os.path Module
Python - fnmatch Module
Python - Tuple Introduction
Python - List Introduction
Python - List Add Element
Python - List Delete Element
Python - List Modification Element
Python - List Find Element
Python - Dictionary Introduction
Python - Dictionary Basic Operation
Python - Dictionary Method Guide
Python - Set Collection
Python - Set Basic Operation
Python - Set Basic Method
Python - Frozenset Method
Python - If Condition I
Python - If Condition II
Python - While loop
Python - For loop
Python - Pass Statement
Python - Break Statement
Python - Zip Reverse Function
Python - Function Introduction
Python - Positional Parameters
Python - Key Arguments
Python - None and Return
Python - Variable Scope
Python - Local Function
Python - Closure Method
Python - Lamdba Expression

More Python Exercises:

Python String Exercises
Python List Exercises
Python Library Exercises
Python Sets Exercises
Python Array Exercises
Python Condition Statement Exercises