Python Theory Syllabus
Python Theory Syllabus
Python Programming
Version 1.0 2 0 0 2
Pre-requisites/Exposure Basic Principles of Programming Language
Co-requisites
Course Objectives
Course Outcomes
On completion of this course, the students will be able to
CO1. To know the basics of python programming concepts such as operators, decision Making and
Loop structures.
CO2. To understand and apply various collections and implementing functions.
CO3. To understand concepts of packages and modules, exceptions, regular expressions and file handling
operations.
CO4. To understand and implement OOPS concepts using python and apply Numpy, Pandas and
Matplotlib library for data analysis and visualization.
Catalog Description
Python is a programming language with a simple syntax, and a powerful set of libraries. It is an interpreted
language, with a rich programming environment, including a robust debugger and profiler. While it is easy
for beginners to learn, it is widely used in many scientific areas for data understanding and exploration. It
covers data types, control flow, object-oriented programming, and graphical user interface-driven
applications. It helps in analyzing data with the help of different visualization techniques.
Course Content
Unit 1.
Introduction to Python
Introduction, Installing Python, Executing Python from the Command Line, IDLE, Interactive mode and
Scripting mode, Getting Help, Dynamic Types, Mutable and immutable data types
Language Components
Indentation, Decision Making Statements (if, if else, elif, nested if), range function, looping structures(while
loop, for loop), (break, continue & pass statements), else in loops, nested loops
Unit 2.
Collections
String:String initialization, String Operators, String functions, indexing, slicing, split() function
List: List initialization, List methods, List operations, indexing, slicing, list comprehension, Nesting in
lists
Tuple: tuple initialization, tuple methods, tuple operations, nesting in tuple, List vs Tuple
Set: Set initialization, Set methods, Set operations, Applications of Set
Dictionary: Dictionary initialization, Dictionary methods, Nesting in Dictionary, Sorting data collections,
typecasting collections, Applications of collections
Functions
Introduction, Defining user defined function, Parameters, Function Documentation, Keyword and Optional
Parameters, default argument, Variable length Arguments, Scope, Passing Collections to a Function,
Passing Functions to a Function, Recursion, map, filter, Lambda function, Inner Functions, Passing mutable
and immutable datatypes in functions
Unit : 3
File Handling
File Access Modes, File handling Functions, Writing Data to a File, Reading Data from a File, Additional
File Methods, With Statement, Working with Directories, Applications of File Handling
Exceptions
Errors vs Exceptions, The Exception Model, Exception Hierarchy, Exception Handling (try, except, else,
finally), Handling Multiple Exceptions, raise, assert
Regular Expressions
Need for Regular Expressions, Regular Expression Functions (match, search, sub, findall, finditer), Meta
characters , Character Class, Groups
Unit 4.
Classes in Python
OOP Concepts, Classes in Python, Creating Classes and Objects, methods in classes, Constructor, Special
Methods in classes, Class Variables and Object Variables, Public and Private data members, Built-in Class
Attributes, Garbage Collection, Abstract class, Inheritance, types of inheritance, Polymorphism (Function
overriding, operator overloading)
Unit 5
Numpy – Overview, numpy Ndarray, Datatypes, Array creation, List vs Array, numpy attributes, numpy
operations, Numpy Broadcasting, Numpy Functions (String, mathematical, statistical, sorting and
searching), Numpy Special functions (reshape(), sum(), random(), zeros(), mean(), dot(), std(), empty(),
arange(), numpy.linspace())
Pandas – Overview, Pandas Data Structures: Series and Data Frame, Operations on a Series (head, tail,
vector operations), Data Frame operations( create, display, iteration, select column, add column, delete
column), Binary operations in a Data Frame (add, sub, mul, div), Matching and broadcasting operations,
Handling Missing data and filling values, Comparisons, Boolean reductions, comparing Series, combining
Data Frames, Importing/Exporting Data between CSV files and Data Frames
Matplotlib- Introduction, Matplotlib Pyplot, Plotting, markers, Line, Labels, Grid, Customizing plots,
Creating Different Types of Plots (Line Graph, Bar chart, Histograms, Scatter Plot, Pie Chart), Creating
Subplots