IT 243: Programming with Python
(BIM 5th Sem)
Credits: 3
Lecture Hours: 48
Course Objectives
The main objective of this course is to provide students both theoretical and practical knowledge
of different concepts of Python programming language. After completing this course, students
will be able to
Learn importance of Python programming,
Learn basic programming concepts of Python programming language,
Use object-oriented concepts,
Learn file handling concepts,
Use some common Python libraries such as Numpy, Pandas, and Matplotlib,
Use GUI features, database handling,
Use basic concepts of Python web development.
Course Description
This course covers different concepts of Python programming language including basic language
features, operators, built-in data types, control statements, functions, object-oriented
programming, exception handling, file handling, modules and packages, common libraries
(NumPy, Pandas, and Matplotlib), GUI programming, database handling, and some concepts of
web development.
Course Details
Unit 1: Introduction 3 LHs
Python Introduction; Why Python? Installing and Running Python using Interactive Shell
and Console; Using IDLE and IDE; Installing Third Party Libraries; Working with
Virtual Environment; Writing Comments; Indentation; Tokens; Identifiers; Keywords;
Literals; Variables and Constants; The id() function; Operators.
Unit 2: Control Statements 4 LHs
Introduction; Selection Statements (if statements and match-case statement); Using if-
else as Ternary Operator; Looping Statements (for and while Loops); The else Clause
after for or while Loops; The break and continue Statements; The pass Statement.
Unit 3: Built-In Data Types 8 LHs
Introduction; Numeric Types – Integers, Floating Point Numbers and Complex Numbers;
String – Indexing and Slicing, String Formatting, Escape Sequences; Boolean; List –
Indexing and Slicing, Changing Items, Adding and Removing Items, Looping, Copying,
List Comprehension, Sorting, Copying, and Joining; Tuple – Updating, Indexing and
Slicing, Unpacking, Looping, Joining; Set – Accessing, Adding and Removing Items, Set
Operations; Frozenset; Range; Dictionary; Binary Types; None Type.
Unit 4: Functions 3 LHs
Introduction; Benefits of using Functions; Creating and Calling Functions; Passing
Arguments; Packing and Unpacking Arguments using Tuples and Dictionaries; Return
Values and Returning Multiple Values; Recursive Function; Lambda Function.
Unit 5: Object-oriented Programming 9 LHs
Introduction; Object-Oriented Principles – Classes and Objects, Encapsulation;
Inheritance, Polymorphism, Abstraction; Defining a Class – Adding Instance Variables,
Adding Instance Methods, Adding Class Variables, Adding Class Methods, Adding
Static Methods; Constructors; Method Overloading; Inheritance and its Types; Method
Overriding; Access Modifiers; Abstract Class; Operator Overloading; Magic Methods;
Exception Handling; Modules and Packages; Enumeration.
Unit 6: File Handling 3 LHs
Introduction; File Opening Models; Reading and Writing Files; The os Module and
Common Functions; The with Statement.
Unit 7: Common Python Libraries 8 LHs
Numpy: Introduction; Array Creating; Dimensions; Data Types, Array Attributes,
Indexing and Slicing; Array Copy and View; Creating Array from Numerical Range;
Array Broadcasting; Iterating Over Array; Sorting and Searching; Statistical Functions
Pandas: Series and DataFrames; Creating DataFrames; The head and tail Functions;
Attributes; Working with Missing Data; Indexing, Slicing, and Subsetting; Merging and
Joining DataFrames; Working with CSV Files
Matplotlib: Introduction; Marker; Line; Color; Label; Grid Lines; Subplot; Scatter Plot;
Bra Graph; Histogram, pie chart and Box plot.
Unit 8: Advanced Topics 10 LHs
Working with Database and Using SQL Statements; Basics of GUI Programming, Basics
of Web Development.
Laboratory Work:
The laboratory work includes writing programs using Python programming language covering
all the concepts studied in each unit of the course.
References:
1. Fabrizio Romano and Heinrich Kruger, Learn Python Programming – An in-depth
Introduction to the fundamentals of Python, Third Edition, Packt Publishing, 2021
2. Kenneth A Lampart, Fundamental of python, Cengage Learning Publishing.
3. Cody Jackson (2018): Learn programming in Python with cody Jackson, Packt
Publishing, Wesley.
4. Mark Summerfield: "Programming in Python 3: A Complete Introduction to the Python
Language", Addison-Wesley Professional.