Python Programming
Offered in Semester 2 for CSE, IT, ECE, CSE-AI, CSE-DS · Prerequisites: None
01Syllabus (unit-wise)
Official topics from the 2025-26 syllabus, unit by unit.
IUnit I▸
Identifiers, keywords, indentation, comments, documentation strings, Unicode and encoding, data types and type hints, object identity vs equality, operator precedence and associativity, input/output (print formatting with f-strings, format(), old %), command-line arguments using sys.argv, control flow: if, elif, else, match statement (PEP 634), loops: for, while, break, continue, else with loops, iterator protocol (__iter__, __next__), comprehensions (list, set, dict, nested), unpacking and zipping, enumerate, zip, range.
IIUnit II▸
Defining and calling functions, arguments: positional, keyword, default, variable-length (*args, **kwargs), recursion, anonymous functions with lambda, map, filter, reduce, any, all, sorted, min, max with custom keys, first-class functions, closures, decorators (basic and with arguments), generators (yield, send), iterators vs generators, import system, module search path, creating and importing user-defined modules, packages and __init__.py, virtual environments and dependency management, built-in collections: list, tuple, dict, set, frozenset, Counter, defaultdict, OrderedDict, deque.
IIIUnit III▸
Classes and objects, class and instance attributes, methods (self), constructor (__init__), attribute access control, class variables and methods (@classmethod, @staticmethod), inheritance, method overriding, composition vs inheritance, super(), abstract classes and interfaces using abc, operator overloading (__add__, __eq__, etc.), duck typing, multiple inheritance, MRO (Method Resolution Order), introspection (dir(), hasattr(), getattr()), exception hierarchy, custom exceptions, structured exception handling (try-except-else-finally), resource management with with, file I/O, JSON and CSV processing, pickling, error and exception best practices.
IVUnit IV▸
Modeling with Python data structures (lists, stacks, queues, dictionaries, sets), simulation problems, trees: node- based and list-based representations, binary tree traversal, recursion vs iteration, search and sorting using Pythonic methods, time and space complexity analysis using empirical profiling, introduction to timeit and cProfile, unit testing (unittest, doctest, pytest), assertions, type checking (mypy, typeguard), type annotations and gradual typing (PEP 484), introduction to NumPy arrays, basic file-based or JSON-based persistence, project structure, naming conventions (PEP 8), packaging and publishing modules, documentation with pydoc and sphinx.
02Marking scheme
How this paper is evaluated
03Course outcomes
What you should be able to do after this course
Ability to write procedural programmes in Python.
Ability to write programs using standard data structures.
Ability to use object oriented paradigm to write program in Python.
Ability to write modular program in Python
04Books
Prescribed textbooks and references
Textbooks
- 01Fluent Python, Luciano Ramalho, O’Reilly Media, Latest Edition.
References
- 01Think Python: How to Think Like a Computer Scientist, Allen B. Downey, Green Tea Press, Latest
- 02Edition.
- 03Effective Python, Brett Slatkin, Addison-Wesley, Latest Edition.
- 04Python for Everybody, Charles Severance, Open Access Edition.
- 05Automate the Boring Stuff with Python, Al Sweigart, No Starch Press, Latest Edition.
No notes or PYQs yet
This section fills up as more resources are added. Check back soon — or ask in the community.