0% found this document useful (0 votes)
11 views12 pages

L1:Python

1) The Python programming language was named after the British comedy TV show Monty Python's Flying Circus by its creator Guido van Rossum, who was a big fan. 2) Python is a high-level, multi-paradigm programming language that is portable, has simple syntax, and includes a large standard library. 3) Python supports object-oriented, imperative and functional programming styles, making it flexible for a wide range of projects.

Uploaded by

Mayur Kinra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views12 pages

L1:Python

1) The Python programming language was named after the British comedy TV show Monty Python's Flying Circus by its creator Guido van Rossum, who was a big fan. 2) Python is a high-level, multi-paradigm programming language that is portable, has simple syntax, and includes a large standard library. 3) Python supports object-oriented, imperative and functional programming styles, making it flexible for a wide range of projects.

Uploaded by

Mayur Kinra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Computer Programming with Python

27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University 10


Introduction to Python

Why the name Python? Why not Anaconda? Why not Lion or Tiger?
[Anaconda is the heaviest and the biggest snake in the world. On the other
hand, the python is the longest snake in the world]
Who is the king of snakes?
King cobra?

BTW, the name of the programming language Python is not related to snake,
neither longest nor biggest snake!

27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University 11


Guido van Rossum - Python’s creator

12
27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University
Naming the programming language Python
The name Python comes from the creator - Guido van Rossum. Python is
designed and first implemented by Guido van Rossum at CWI (Centrum
Wiskunde & Informatica, Netherlands) in the late 1980s (1989-1991). Python
programming language, first released in the early 1990s. Python creator Guido
van Rossum named it after the British(BBC) television comedy series of show
Monty Python’s Flying Circus(Check them out on YouTube!), which first aired on
the BBC in 1969. Van Rossum was a big fan of Monty Python. Van Rossum
thought he needed a name that was short, unique, and slightly mysterious, so he
decided to call the language Python.

Python programmers – Pythonistas - programmers who are real loyal fans


of Python-the-language
13
27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University
Why learn Python? Why Do People Use Python? Why not
JAVA/C? What Magic is there in Python? What makes
Python different from other programming languages?

As per the market research, Python is the most useful programming language and
has a very big area of application.

Python emerged as a leader among well-established and optimized programming


languages including C, C++, and Java for very simple reasons.

Most Linux systems also come with a complete and usable Python installation.

14
27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University
What Magic is there in Python?
Python supports multi-paradigm(meaning it supports more than one style or philosophy
of programming) programming language, including object-oriented, imperative and
functional programming or procedural styles.

Portable : The amazing thing about Python is that you really can write an application on
one platform(Runs anywhere, any hardware/architecture + OS) and use it on every
other platform that you need to support. In contrast to other programming languages
that promised to provide platform independence, Python really does make that
independence possible. In this case, the promise is as good as the result you get.

High-level language : Python syntax is simple/light and is relatively easy to learn. Python
emphasizes simplicity, code readability, less code and a concise syntax that lets you write
applications using fewer lines of code than other programming languages (say, C++ or
Java) require.
15
27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University
What Magic is there in Python(contd..)?
Python statements are very close to those of pseudocode algorithms, and Python
expressions use the conventional notation found in algebra. Thus, students can spend less
time learning the syntax of a programming language and more time learning to solve
interesting problems.

Python is ideal for projects that require quick development. It supports multiple
programming philosophies, so it's good for programs that require flexibility. The many
packages and modules already written for Python provide versatility and save you time.

Interactive Mode : Python has support for an interactive mode(Python shell) which
allows interactive testing and debugging of snippets of code.

Python is considered an interpreted(opposed to complied) language because Python


programs are executed by an interpreter. Python also offers much more error checking
than C
27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University 16
What Magic is there in Python(contd..)?
Python has high-level built in data types, such as flexible arrays and dictionaries.
Because of its more general data types Python is applicable to a much larger
problem domain.

Free/open-source, It doesn't cost anything to download or use Python

Python comes with a wide range of rich standard library functions that supports
many common programming tasks such as connecting to web servers, searching
text with regular expressions, reading and modifying files.

It is also used for scientific(scipy) and numerical(numpy) computing, and


plotting(matplotlib), and a number of core ideas relevant to Computational
Engineering. 17
27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University
Python programming
There are two ways to use the interpreter: interactive mode and script mode.

By convention, Python scripts have names that end with .py

To exit Python shell(>>>) : CTRL-D, exit()

python.org ---> Download ---> 3.6 or 3.7

Anaconda and Miniconda

Anaconda = Python + packages(numpy+scipy+matplotlib+….)


27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University 18
Advanced features of Python
Systems Programming, system-administration tools and utilities (sometimes called
shell tools), Graphical User Interface(GUI) programming, networking tasks in client
and server modes, Internet Scripting, Component Integration, Component
Integration, Rapid Prototyping, Numeric and Scientific Programming, Gaming,
Images, Serial Ports, XML, Robots, and More.

27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University 19


Large Organizations That Use Python

20
27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University
What are some of the drawbacks of Python?
No language is perfect.

Python’s interpreter’s execution speed may not always be as fast as that of compiled
languages such as C, C++ or JAVA.

Python is not a very good language for mobile application development and browsers.

Python is not a good choice for memory intensive tasks. Due to the flexibility of the data-
types, Python's memory consumption is also high.

Python has limitations with database access . 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.

Python not a great choice for a high-graphic 3d game that takes up a lot of CPU.
21
27/07/2018 Debajyoti Ghosh, Asst. Prof, BML Munjal University

You might also like