This document provides an introduction to Python programming, including:
- Python was created in 1991 by Guido van Rossum as an interpreted and general-purpose programming language.
- It focuses on code readability and allows programmers to do coding in fewer steps than languages like Java or C++.
- Popular uses of Python include backend web development, data analysis, artificial intelligence, and scientific computing.
- Key advantages that make Python popular include being easy to learn and use, having a large standard library, and supporting multiple programming paradigms.
Overview of Chapter 1 on getting started with Python programming, highlighting importance for education and practical aspects.
Introduction of Guido van Rossum, Python's creator, and history of its development from 1989 to 1991.
Discussion on Python's evolution, its relationship with C, and the motivations behind its creation.
Reason behind the name 'Python' inspired by 'Monty Python's Flying Circus', chosen by Guido van Rossum.
Growth of Python as a preferred language in companies, with statistics on its usage and key language features.
Examples of various companies using Python and the extent of its adoption across industries.
Highlighting key advantages of Python including ease of use, expressiveness, and applicability across various fields.
Discussion on limitations and downsides of using Python in certain scenarios and applications.
Defining the roles of compilers and interpreters in programming language conversion.
Information on setting up Python on various platforms and overview of Python distributions.
Details on Python distributions and specific variants available for different development needs.Explanation of what an IDE is and its components, particularly in relation to Python programming.
Listings and discussions of various popular IDEs available for Python development.
Overview of various text editors suitable for Python programming, highlighting their features.
Introduction to the default CPython distribution and the Python interactive shell for execution.
Explaining the two basic modes in Python: script mode and interactive mode for execution.
Defining scripts in Python and their usage in executing reusable code efficiently.
Instructions for saving and running Python script files effectively.
Introduction to Anaconda Navigator and Jupyter Notebook as tools for Python development.
Overview of Spyder IDE as a powerful scientific programming tool for Python.
Introduction to PyScripter IDE aimed at Windows users for Python development.
Open floor for questions allowing further clarification on discussed topics.
Thanks expressed to the audience concluding the presentation.
4.1 Unit 1:
Programmingand Computational Thinking (PCT-1)
XI
Computer Science (083)
Board : CBSE
Courtesy CBSE
3.
4.1 Unit I
Programmingand Computational
Thinking (PCT-1)
(80 Theory + 70 Practical)
DCSc & Engg, PGDCA,ADCA,MCA.MSc(IT),Mtech(IT),MPhil (Comp. Sci)
Department of Computer Science, Sainik School Amaravathinagar
Cell No: 9431453730
Praveen M Jigajinni
Prepared by
Courtesy CBSE
INTRODUCTION
Python is ahigh-level, interpreted and general-
purpose dynamic programming language that
focuses on code readability. The syntax in Python
helps the programmers to do coding in fewer steps
as compared to Java or C++.
The language founded in the year 1991 by the
developer Guido Van Rossum has the programming
easy and fun to do.
GUIDO VAN ROSSUM
Guidovan Rossum is a
Dutch programmer best
known as the author of
the Python programming
language, for which he
was the "Benevolent
Dictator For Life" until he
stepped down from the
position in July 2018.
10.
GUIDO VAN ROSSUM
Born31 January 1956 (age 62)
Haarlem, Netherlands
Residence Belmont, California, U.S.
Nationality Dutch
Alma mater University of Amsterdam
Occupation Computer programmer,
author
Employer Dropbox
Known for Creating the Python
programming language
Spouse(s) Kim Knapp (m. 2000)
Children Orlijn Michiel Knapp-van
Rossum
Website www.python.org/~guido/
11.
INTRODUCTION
The Python iswidely used in bigger
organizations because of its multiple
programming paradigms. They usually
involve imperative and object-oriented
functional programming. It has a
comprehensive and large standard
library that has automatic memory
management and dynamic features.
12.
INTRODUCTION
Python is ageneral-purpose language,
which means it can be used to build just about
anything, which will be made easy with the
right tools/libraries.
Professionally, Python is great for backend
web development, data analysis, artificial
intelligence, and scientific computing. Many
developers have also used Python to build
productivity tools, games, and desktop apps, so
there are plenty of resources to help you learn
how to do those as well.
13.
HISTORY OF PYTHON
Workon Python began in late
1989 by Guido van Rossum, then at
Centrum Wiskunde (Pronounce as viskulu
meaning mathematics) & Informatica CWI
in the Netherlands, and eventually
released for public distribution in early
1991.
14.
HISTORY OF PYTHON
Pythonwas conceived in the late
1980s, and its implementation began in
December 1989 by Guido van Rossum at
Centrum Wiskunde (Pronounce as viskulu
meaning mathematics) & Informatica
(CWI) in the Netherlands as a successor to
the ABC language (itself inspired by SETL)
capable of exception handling and
interfacing with the Amoeba operating
system.
Where was Python created?
15.
HISTORY OF PYTHON
Sincemost modern OS are written in
C, compilers/interpreters for modern
high-level languages are also written in C.
Python is not an exception - its most
popular/"traditional" implementation is
called CPython and is written in C. There
are other implementations: IronPython
(Python running on .NET).
What language is Python written in?
16.
HISTORY OF PYTHON
Howdid it all begin? Innovative
Languages are usually born from one of two
motivations:
(1) A large well-funded research project
or
(2) General frustration due to the lack of tools
that were needed at the time to accomplish
mundane and/or time-consuming tasks, many
of which could be automated.
17.
HISTORY OF PYTHON
How did it all begin? Innovative
At the time, van Rossum was a researcher with
considerable language design experience with
the interpreted language ABC, also developed
at CWI (Centrum Wiskunde (Pronounce as
viskulu meaning mathematics) &
Informatica.P.O.Box 940791090 GB Amsterdam
NETHERLANDS), but he was unsatisfied with its
ability to be developed into something more.
18.
HISTORY OF PYTHON
How did it all begin? Innovative
Some of the tools he envisioned were for
performing general system administration tasks,
so he also wanted access to the power of
system calls that were available through the
Amoeba distributed operating system. Although
an Amoeba-specific language was given some
thought, a generalized language made more
sense, and late in 1989, the seeds of Python
were sown.
19.
HISTORY OF PYTHON
What is CWI? Where it is located?
Centrum Wiskunde (Pronounce as viskulu
meaning mathematics) & Informatica (CWI) is
the national research institute for mathematics
and computer science in the Netherlands.
Founded in 1946, CWI is part of the Institutes
Organisation of NWO, NWO-I. While located
at Amsterdam Science Park, this institute has
strong international links, and enjoy a global
reputation for innovative research.
When he began
implementingPython, Guido van
Rossum was also reading the published
scripts from “Monty Python's Flying
Circus”, a BBC comedy series from the
1970s. Van Rossum thought he needed
a name that was short, unique, and
slightly mysterious, so he decided to call
the language Python.
Where does the Python name come from?
Python has topthe charts in the recent years
over other programming languages like C, C++
and Java and is widely used by the programmers.
The language has undergone a drastic change
since its release 25 years ago as many add-on
features are introduced. The Python 1.0 had the
module system of Modula-3 and interacted with
Amoeba Operating System with varied
functioning tools. Python 2.0 introduced in the
year 2000 had features of garbage collector and
Unicode Support.
WHY COMPANIES PREFER PYTHON?
27.
Python 3.0 introducedin the year 2008 had a
constructive design that avoids duplicate
modules and constructs. With the added
features, now the companies are using Python
3.5.
The software development companies prefer
Python language because of its versatile features
and fewer programming codes. Nearly 14% of
the programmers use it on the operating systems
like UNIX, Linux, Windows and Mac OS.
WHY COMPANIES PREFER PYTHON?
28.
The programmers ofbig companies use Python
as it has created a mark for itself in the software
development with characteristic features like:
Interactive
Interpreted
Modular
Dynamic
Object-oriented
Portable
High level
Extensible in C++ & C
WHY COMPANIES PREFER PYTHON?
29.
The programmers ofbig companies use Python
as it has created a mark for itself in the software
development with characteristic features like:
Easy-to-learn
Easy-to-read
Easy-to-maintain
Robust
Effective as a Rapid Prototyping Tool
A Memory Manager
Interpreted and (Byte-) Compiled
WHY COMPANIES PREFER PYTHON?
PYTHON ADVANTAGES -PLUS POINTS
01. Easy to Use.
02. Expressive Language.
03. Interpreted Language.
04. Its Completeness.
05. Cross Plat Form Language.
06. Free and Open Source.
07. Variety of Usage/Applications.
37.
PYTHON ADVANTAGES -PLUS POINTS
08. Interactive.
09. Modular.
10. Dynamic.
11. Object-oriented.
12. Portable.
13. High level.
14. Extensible in C++ & C.
38.
PYTHON ADVANTAGES -PLUS POINTS
15. Easy-to-learn .
16. Easy-to-read.
17. Easy-to-maintain.
18. Robust.
19. Effective as a Rapid Prototyping Tool
20. A Memory Manager.
21. Interpreted and (Byte-) Compiled.
22. Multi paradigm language.
39.
PYTHON ADVANTAGES -PLUS POINTS
23. Acts as foundation to learn other
languages.
24. Perfect to build prototypes.
25. Flexible.
26. Case Sensitive Language.
27. Structured programming language.
30. Scientific Language.
31. General purpose language.
PYTHON DISADVANTAGES -MINUS POINTS
01. Speed.
02. Mobile Development.
03. Easy-to-maintain.
04. Memory Consumption.
05. Database Access.
06. Runtime Errors.
07. Not Strong on Type-Binding or
Dynamic Typing.
42.
PYTHON DISADVANTAGES -MINUS POINTS
08. Python is evolving continuously.
09. Not a great choice for a high-graphic
3d game.
10. Designs issues.
11. Memory Consumption.
12. Simple rules.
WORKING IN PYTHON
Pythonis free, open-source software
that works on Linux, Mac, Windows, and
various other platforms (21 in total).
It comes preinstalled on Mac and most
distributions of Linux.
There are multiple python
distributions available.
PYTHON DISTRIBUTION
A Pythondistribution is a software
bundle, which contains a Python
interpreter and the Python standard
library. Installer programs for common
operating systems.
What is Python distribution?
52.
PYTHON DISTRIBUTION
• Asidefrom the official CPython
distribution available from python.org,
other distributions based on CPython
include the followings:
SOME PYTHON DISTRIBUTION
CHINESEPYTHONPROJECT: Translation of
Python's keywords, internal types and
classes into Chinese. Eventually allows a
programmer to write Python programs in
Chinese.
What is anIDE?
An integrated development environment
(IDE) is a software application that provides
comprehensive facilities to computer
programmers for software development.
An IDE normally consists of a source code
editor, build automation tools, and a debugger.
Most modern IDEs have intelligent code
completion.
PYTHON IDE /IDLE
IDLE (short for integrated
development environment or integrated
development and learning environment)
is an integrated development
environment for Python, which has been
bundled with the default implementation
of the language since 1.5.2b1.
... Pythonshell with syntax highlighting.
What is Python IDE or IDLE?
PYTHON SHELL
What isShell?
A shell is usually an "interactive shell",
usually termed a REPL which stands for
"Read - Execute - Print - Loop" Most
interpreted languages offer a REPL
interface - whether its LISP, python, BASIC
or Javascript or even DOS batch language
or Unix Shells. The interpreter is what
actually executes the lines of code.
98.
PYTHON SHELL
What isPython Shell or Python
Interactive Shell?
The Python interpreter can be used from
an interactive shell. The interactive shell
is also interactive in the way that it stands
between the commands or actions and
their execution. ... Python offers a
comfortable command line interface with
the Python shell, which is also known as
the "Python interactive shell".
PYTHON BASIC MODES
Whatare the basic modes of python?
Python has two basic modes:
1) Script and
2) Interactive.
101.
PYTHON BASIC MODES
1)Script Mode:
The normal mode is
the mode where the scripted and
finished .py files are run in
the Python interpreter.
102.
PYTHON BASIC MODES
2)Interactive Mode:
Interactive mode is a command line
shell which gives immediate feedback
for each statement, while running
previously fed statements in active
memory.
103.
SCRIPT
What is Script?
Scriptsare reusable. Basically,
a script is a text file containing the
statements that comprise
a Python program. Once you have
created the script, you can execute it
over and over without having to
retype it each time. Scripts are
editable.
JUPYTER NOTEBOOK IDE
TheJupyter Notebook is an ANACONDA TOOL
and is an open-source web application that
allows you to create and share documents that
contain live code, equations, visualizations and
narrative text.
Note: Jupyter Notebook runs on your browser.
What is Jupyter Notebook?
SPYDER IDE
Spyder isan open source cross-
platform integrated development
environment (IDE) for scientific
programming in the Python language
What is Spyder?
PyScripter IDE
PyScripter isa free and open-source
Python Integrated Development
Environment (IDE) created with the
ambition to become competitive in
functionality with commercial Windows-
based IDEs available for other languages
What is PyScripter?