AVS COLLEGE OF ARTS & SCIENCE
(AUTONOMOUS)
Attur Main Road, Ramalingapuram, Salem - 106. (Recognized
under section 2(f) & 12(B) of UGC Act 1956 and Accredited by
NAAC with 'A' Grade)
(Co - Educational Institution | Affiliated to Periyar University, Salem ISO 9001 : 2015 Certified Institution)
| www.avscollege.ac.in Ph : 98426 29322, 94427 00205.
Study Material
PAPER NAME : PROGRAMMINF IN PYTHON
PAPER CODE : 21UCA13
BATCH : 2021-2024
SEMESTER : VI
STAFF IN CHARGE : E.MYTHILI
, Programming in Python
UNIT-I
Python – origins – features – variable and assignment - Python basics – statement and syntax –
Identifiers – Basic style guidelines – Python objects – Standard types and other built-in types –
Internal types – Standard type operators – Standard type built-in functions.
UNIT-II
Numbers – Introduction to Numbers – Integers – Double precision floating point numbers – Complex
numbers – Operators – Numeric type functions – Sequences: Strings, Lists and Tuples – Sequences –
Strings and strings operators – String built-in methods – Lists – List type Built in Methods – Tuples.
UNIT-III
Mapping type: Dictionaries – Mapping type operators – Mapping type Built-in and Factory Functions
- Mapping type built in methods – Conditionals and loops – if statement – else Statement – elif
statement – conditional expression – while statement – for statement – break statement – continue
statement – pass statement – Iterators and the iter( ) function - Files and Input/Output – File objects –
File built-in functions – File built-in methods – File built-in attributes – Standard files – command line
arguments.
UNIT-IV
Functions and Functional Programming – Functions – calling functions – creating functions – passing
functions – Built-in Functions: apply( ), filter( ), map( ) and reduce( ) - Modules – Modules and Files
– Modules built-in functions - classes – class attributes – Instances.
UNIT-V
Database Programming – Introduction - Basic Database Operations and SQL - Example of using
Database Adapters, Mysql - Regular Expression – Special Symbols and Characters – REs and Python.
Learning Resources
Text Books
Title of Book Publisher Year of Publication 1 Wesley J. Chun Core Python Programming Pearson
Education Publication 2012
Reference Books
1. Wesley J. Chun Core Python Application Programming Pearson Education Publication 2015
,2. Eric Matthes Python crash course William pollock 2016
3. Zed Shaw Learn Python the hard way Addition Wesley 2017
4. Mark Lutz Python pocket reference O’Reilly Media 2014 Pedagogy
UNIT-I
Introduction
Python is a high-level, interpreted, interactive and object-oriented scripting language.
Python is Interpreted
Python is processed at runtime by the interpreter.
No need to compile the program before executing it.
This is similar to PERL and PHP.
Python is Interactive
We can interact with the interpreter directly to write the programs.
Python is Object-Oriented
Python supports Object-Oriented style.
It encapsulates code within objects.
Python is a Beginner's Language
Python is a great language for the beginner level programmers.
It supports the development of a wide range of applications from simple text processing to WWW
browsers to games.
History of python
Python was developed by Guido van Rossum at National Research Institute for Mathematics and
Computer Science in Netherlands in 1990.
Rossum wanted the name of his new language to be short, unique and mysterious.
Inspired by Monty Python‘s Flying Circus, a BBC comedy series, he named the language Python.
Python became a popular programming language.
It is widely used in both industry and academia because of its simple, concise and extensive
support of libraries.
It is a general purpose, interpreted and object-oriented programming language.
Python source code is available under General Public License (GPL) and maintained by a core
development team.
Python 1.0 was released in November 1994. In 2000, Python 2.0 was released.
Python 2.7.11 is the latest edition of Python 2.
Python 3.0 was released in 2008. Python 3 is not backward compatible with Python 2.
Python 3.5.1 is the latest version of Python 3.
, Python Features:
Python is a feature rich high-level, interpreted, interactive and object-oriented scripting
language. This tutorial will list down some of the important features of Python:
Following section will explain these features in more detail:
Python is Easy to Learn
This is one of the most important reasons for the popularity of Python. Python has a limited set
of keywords.
Its features such as simple syntax, usage of indentation to avoid clutter of curly brackets and
dynamic typing that doesn't necessitate prior declaration of variable help a beginner to learn
Python quickly and easily.
Python is Interpreter Based
Python is an interpreter based language. The interpreter takes one instruction from the source
code at a time, translates it into machine code and executes it.
Instructions before the first occurrence of error are executed. With this feature, it is easier to
debug the program and thus proves useful for the beginner level programmer to gain
confidence gradually.
Python therefore is a beginner-friendly language.
Python is Interactive
Standard Python distribution comes with an interactive shell that works on the principle of
REPL (Read – Evaluate – Print – Loop).
The shell presents a Python prompt >>>. You can type any valid Python expression and press
Enter. Python interpreter immediately returns the response and the prompt comes back to read
the next expression.
(AUTONOMOUS)
Attur Main Road, Ramalingapuram, Salem - 106. (Recognized
under section 2(f) & 12(B) of UGC Act 1956 and Accredited by
NAAC with 'A' Grade)
(Co - Educational Institution | Affiliated to Periyar University, Salem ISO 9001 : 2015 Certified Institution)
| www.avscollege.ac.in Ph : 98426 29322, 94427 00205.
Study Material
PAPER NAME : PROGRAMMINF IN PYTHON
PAPER CODE : 21UCA13
BATCH : 2021-2024
SEMESTER : VI
STAFF IN CHARGE : E.MYTHILI
, Programming in Python
UNIT-I
Python – origins – features – variable and assignment - Python basics – statement and syntax –
Identifiers – Basic style guidelines – Python objects – Standard types and other built-in types –
Internal types – Standard type operators – Standard type built-in functions.
UNIT-II
Numbers – Introduction to Numbers – Integers – Double precision floating point numbers – Complex
numbers – Operators – Numeric type functions – Sequences: Strings, Lists and Tuples – Sequences –
Strings and strings operators – String built-in methods – Lists – List type Built in Methods – Tuples.
UNIT-III
Mapping type: Dictionaries – Mapping type operators – Mapping type Built-in and Factory Functions
- Mapping type built in methods – Conditionals and loops – if statement – else Statement – elif
statement – conditional expression – while statement – for statement – break statement – continue
statement – pass statement – Iterators and the iter( ) function - Files and Input/Output – File objects –
File built-in functions – File built-in methods – File built-in attributes – Standard files – command line
arguments.
UNIT-IV
Functions and Functional Programming – Functions – calling functions – creating functions – passing
functions – Built-in Functions: apply( ), filter( ), map( ) and reduce( ) - Modules – Modules and Files
– Modules built-in functions - classes – class attributes – Instances.
UNIT-V
Database Programming – Introduction - Basic Database Operations and SQL - Example of using
Database Adapters, Mysql - Regular Expression – Special Symbols and Characters – REs and Python.
Learning Resources
Text Books
Title of Book Publisher Year of Publication 1 Wesley J. Chun Core Python Programming Pearson
Education Publication 2012
Reference Books
1. Wesley J. Chun Core Python Application Programming Pearson Education Publication 2015
,2. Eric Matthes Python crash course William pollock 2016
3. Zed Shaw Learn Python the hard way Addition Wesley 2017
4. Mark Lutz Python pocket reference O’Reilly Media 2014 Pedagogy
UNIT-I
Introduction
Python is a high-level, interpreted, interactive and object-oriented scripting language.
Python is Interpreted
Python is processed at runtime by the interpreter.
No need to compile the program before executing it.
This is similar to PERL and PHP.
Python is Interactive
We can interact with the interpreter directly to write the programs.
Python is Object-Oriented
Python supports Object-Oriented style.
It encapsulates code within objects.
Python is a Beginner's Language
Python is a great language for the beginner level programmers.
It supports the development of a wide range of applications from simple text processing to WWW
browsers to games.
History of python
Python was developed by Guido van Rossum at National Research Institute for Mathematics and
Computer Science in Netherlands in 1990.
Rossum wanted the name of his new language to be short, unique and mysterious.
Inspired by Monty Python‘s Flying Circus, a BBC comedy series, he named the language Python.
Python became a popular programming language.
It is widely used in both industry and academia because of its simple, concise and extensive
support of libraries.
It is a general purpose, interpreted and object-oriented programming language.
Python source code is available under General Public License (GPL) and maintained by a core
development team.
Python 1.0 was released in November 1994. In 2000, Python 2.0 was released.
Python 2.7.11 is the latest edition of Python 2.
Python 3.0 was released in 2008. Python 3 is not backward compatible with Python 2.
Python 3.5.1 is the latest version of Python 3.
, Python Features:
Python is a feature rich high-level, interpreted, interactive and object-oriented scripting
language. This tutorial will list down some of the important features of Python:
Following section will explain these features in more detail:
Python is Easy to Learn
This is one of the most important reasons for the popularity of Python. Python has a limited set
of keywords.
Its features such as simple syntax, usage of indentation to avoid clutter of curly brackets and
dynamic typing that doesn't necessitate prior declaration of variable help a beginner to learn
Python quickly and easily.
Python is Interpreter Based
Python is an interpreter based language. The interpreter takes one instruction from the source
code at a time, translates it into machine code and executes it.
Instructions before the first occurrence of error are executed. With this feature, it is easier to
debug the program and thus proves useful for the beginner level programmer to gain
confidence gradually.
Python therefore is a beginner-friendly language.
Python is Interactive
Standard Python distribution comes with an interactive shell that works on the principle of
REPL (Read – Evaluate – Print – Loop).
The shell presents a Python prompt >>>. You can type any valid Python expression and press
Enter. Python interpreter immediately returns the response and the prompt comes back to read
the next expression.