Python Programming
Course Code 1BEC305
Scheme 2025
Type of Course PCC
Semester III
Teaching Hours/Week (L:T:P) 3:0:0
CIE Marks 50
Total Hours of Pedagogy (L :T:P:SL&TW) 42:0:0:48
SEE Marks 50
Credits 3
Total Marks 100
Examination type (SEE) Theory
Exam Hours 3
Module-1
Python Basics, Python language features, History, Entering Expressions into the Interactive Shell, The Integer, Floating-Point, and String Data Types, String Concatenation and Replication, Storing Values in Variables, Your First Program, Dissecting Your Program, Flow control, Boolean Values, Comparison Operators, Boolean Operators, Mixing Boolean and Comparison Operators, Elements of Flow Control, Program Execution, Flow Control Statements, Importing Modules, Ending a Program Early with sys.exit(), Functions, def Statements with Parameters, Return Values and return Statements, The None Value, Keyword Arguments and print(), Local and Global Scope, The global Statement, Exception Handling, A Short Program: Guess the Number
Module-2
Data Structures: Lists: The List Data Type, Working with Lists Strings: Manipulating Strings, Working with Strings, Useful String Methods Tuples and Dictionaries, basics Using Data Structures to Model Real-World Things, Manipulating Strings.
Module-3
Pattern Matching with Regular Expressions, Finding Patterns of Text Without Regular Expressions, Finding Patterns of Text with Regular Expressions, More Pattern Matching with Regular Expressions,, The findall() Method, Character Classes, Making Your Own Character Classes, The Caret and Dollar Sign Characters, The Wildcard Character, Review of Regex Symbols.
Reading and Writing Files, Files and File Paths, The os.path Module, The File Reading/Writing Process, Saving Variables with the shelve Module, Saving Variables with the pprint. pformat() Function
Module-4
Classes and objects: Programmer-defined types, Attributes, Rectangles, Instances as return values, Objects are mutable, Copying, Classes and functions: Time, Pure functions, Modifiers, Prototyping versus planning, Classes and methods: Object-oriented features, Printing objects, Another example, The init method, The__str__ method, Operator overloading, Type-based dispatch, Polymorphism.
Module-5
HTTP, The World’s simplest Web Browser, Retrieving an image over HTTP, Retrieving web pages with urllib, XML, Parsing XML, Looping through nodes, JSON, What is database?, Database Concepts, Database Browser, Creating a database table, SQL, Spidering Twitter, Basic data modeling, Programming with multiple tables, Three kinds of Keys, JOIN
Suggested Learning Resources:
Text books:
1. Al Sweigart, “Automate the Boring Stuff with Python”,1st Edition, No Starch Press, 2015. (Available under CC-BY-NC-SA license at https://automatetheboringstuff.com/)
2. Allen B Downey, “Think Python: How to Think Like a Computer Scientist”, 2nd Edition, Green Tea Press, 2015. (Available under CC-BY-NC license at http://greenteapress.com/thinkpython2/thinkpython2.pdf) (Chapters 15 - 18) (Download pdf/html files from the above links)
3. Charles R. Severance, “Python for Everybody: Exploring Data Using Python 3”, 1st, Create Space Independent Publishing Platform, 2016

.png)