SIDDHARTHA ACADEMY OF HIGHER EDUCATION
(Deemed to be University)
VELAGAPUDI RAMAKRISHNA SIDDHARTHA SCHOOL OF ENGINEERING
DEPARTMENT OF INFORMATION TECHNOLOGY
MICRO LEVEL SYLLABUS
Class B. Tech Regulation RSU24
Subject Code 24IT103 Year & Semester I Year II Semester
Title of the Subject PROBLEM SOLVING WITH PYTHON
Text Chapter/Section Page
Unit Content / topic Covered
Book No. Number
Introduction to Python Programming
Features of Python 3.1 83
History of Python 3.2 85
The Future of Python 3.3 87
Writing and Executing First Python Program 3.4 87
Literal Constants 3.5 88
Numbers 3.5.1 88
Strings 3.5.2 90
Variables and Identifiers 3.6 94
Data Types 3.7 94
Assigning or Initializing Values to Variables 3.7.1 94
Multiple Assignment 3.7.2 96
Multiple Statements on a Single Line 3.7.3 97
Boolean 3.7.4 97
Input Operation 3.8 97
I Comments [T1] 3.9 98
Reserved Words 3.10' 98
Indentation 3.11 98
Operators and Expressions 3.12 99
Arithmetic Operators 3.12.1 99
Comparison Operators 3.13.2 100
Assignment and In-place or Shortcut Operators 3.12.3 101
Unary Operators 3.12.4 102
Bitwise Operators 3.12.5 102
Shift Operators 3.12.6 103
Logical Operators 3.12.7 103
Membership Operators 3.12.8 104
Identity Operators 3.12.9 104
Operators Precedence and Associativity 3.12.10 105
Expressions in Python 3.13 106
Type Conversion 3.16 110
Control statements
Introduction to Decision Control Statements 4.1 137
Selection/Conditional Branching Statements 4.2 138
if Statement 4.2.1 138
if-else Statement 4.2.2 139
Nested if Statements 4.2.3 142
if-elif-else Statement 4.2.4 142
Iterative Statement
Basic Loop Structures/ Iterative Statements 4.3 147
while loop 4.3.1 147
for Loop 4.3.2 155
Selecting an appropriate loop 4.3.3 156
Nested Loops 4.4 164
The break Statement 4.5 167
The continue Statement 4.6 168
The pass Statement [T1] 4.7 171
The else Statement used with Loops 4.8 172
II Strings
Concatenating, Appending, and Multiplying Strings 6.1 243
Strings are Immutable 6.2 245
String Formatting Operator 6.3 246
Built-in String Methods and Functions 6.4 249
Slice Operation 6.5 254
Specifying Stride While Slicing Strings 6.5.1 256
ord() and chr() Functions 6.6 257
in, not in operators 6.7 257
Comparing Strings, Iterating String 6.8,6.9 258
Regular Expressions 6.11 268
Lists
Sequence 8.1 322
Lists 8.2 322
Access Values in Lists 8.2.1 323
Updating Values in Lists 8.2.2 323
Nested Lists 8.2.3 325
Cloning Lists 8.2.4 326
III Basic List Operations 8.2.5 326
[T1]
List Methods 8.2.6 327
Using Lists as Stack 8.2.7 330
Using Lists as Queues 8.2.8 331
List Comprehensions 8.2.9 332
Looping in Lists 8.2.10 334
Tuple 8.4 345
Creating Tuple 8.4.1 346
Utility of Tuples 8.4.2 347
Accessing Values in a Tuple 8.4.3 347
Updating Tuple 8.4.4 348
Deleting Elements in Tuple 8.4.5 348
Basic Tuple Operations 8.4.6 349
Sets
Creating a set 8.5.1 359
Set Operations(update, add, remove, discard, pop, clear,
8.5.1 360
union, intersection, difference, symmetric difference)
Dictionaries
Creating a Dictionary 8.6.1 367
Accessing Values 8.6.2 368
Adding and Modifying an Item in a Dictionary 8.6.2 369
Modifying an Entry, Deleting items 8.6.3,8.6.4 369
Functions
Introduction 5.1 185
Need for Functions 5.1.1 186
Function Definition 5.2 187
Function Call 5.3 189
Function Parameters 5.3.1 189
Variable Scope and Lifetime 5.4 191
Local and Global Variables 5.4.1 192
Using the Global Statement 5.4.2 193
Resolution of Names 5.4.3 195
The return statement 5.5 196
More on Defining Functions 5.6 198
Required Arguments 5.6.1 198
Keyword Arguments 5.6.2 198
IV Default Arguments [T1] 5.6.3 199
Variable-length Arguments 5.6.4 201
Lambda Functions or Anonymous Functions 5.7 201
Recursive Functions 5.10' 211
Greatest Common Divisor 5.10.1 213
Finding Exponents 5.10.2 214
The Fibonacci Series 5.10.3 214
Recursion vs Iteration 5.10.4 216
Modules 5.11 217
The from…import statement 5.11.1 218
Name of Module 5.11.2 220
Making your own Modules 5.11.3 220
The dir() function 5.11.4 221
The Python Module 5.11.5 223
Modules and Namespaces 5.11.6 223
Packages in Python 5.11.7 225
Error and Exception Handling
Introduction to Errors and Exceptions 12.1 480
Syntax Errors 12.1.1 480
Logic Error 12.1.2 481
Exceptions 12.1.3 481
Handling Exceptions 12.2 482
Multiple Except Blocks 12.3 483
Multiple Exceptions in a Single Block 12.4 484
Except Block Without Exception 12.5 484
The else Clause 12.6 485
Raising Exceptions 12.7 486
Instantiating Exceptions 12.8 486
Handling Exceptions in Invoked Functions 12.9 487
Built-in and User-defined Exceptions 12.10' 489
The finally Block 12.11 491
Object Oriented Programming (OOP) in Python 2 63
Features of OOP 2.4 72
Classes 2.4.1 72
Objects 2.4.2 73
Methods and Message Passing 2.4.3 73
Inheritance 2.4.4 74
Polymorphism 2.4.5 75
Containership 2.4.6 75
Reusability 2.4.7 75
Delegation 2.4.8 76
Data abstraction and Encapsulation 2.4.9 76
Merits and Demerits of OOP 2.5 77
Applications of OOP 2.5.1 77
V [T1]
Classes and Objects
Classes and Objects 9.2 400
Defining Classes 9.2.1 400
Creating Objects 9.2.2 401
Data Abstraction and Hiding through Classes 9.2.3 401
Class Method and self Argument 9.3 402
The __init__() Method (The Class Constructor) 9.4 403
Class Variables and Object Variables 9.5 403
The __del__() Method 9.6 406
Other Special Methods 9.7 407
Public and Private Data Members 9.8 408
Private Methods 9.9 409
Calling a Class Method from Another Class Method 9.10' 410
Garbage Collection (Destroying Objects) 9.13 414
Inheritance
Introduction 10.1 436
Inheriting Classes in Python 10.2 437
Polymorphism and Method Overriding 10.2.1 438
Types of Inheritance 10.3 441
Multiple Inheritance 10.3.1 441
Multi-level Inheritance 10.3.2 442
Multi-path Inheritance 10.3.3 443
Composition or Containership or Complex Objects 10.4 444
Text Books:
1. R. Thareja, Python Programming: Using Problem Solving Approach, 2nd ed., Oxford University Press, 2019
Reference Books:
1. John Guttag, Introduction to Computation and Programming Using Python, MIT Press, 2016.
2. K. Beecher, Computational Thinking: A Beginner's Guide to Problem-Solving and Programming, BCS Learning, 2017.
3. L. Ramalho, Fluent Python, 2nd ed., O’Reilly Media, 2022.
4. B. Downey, Think Complexity: Complexity Science and Computational Modeling, 2nd ed., O’Reilly Media, 2018.
5. S. Hall, Effective Python: 90 Specific Ways to Write Better Python, 2nd ed., Addison-Wesley, 2019.
Web Resources: [Internet]
1. NPTEL. The Joy of Computing using Python . Available from: [Link]
2. GeeksforGeeks. Python Programming Language – Basics . Available from: [Link]
programming-language/
3. W3Schools. Python Basics Tutorial . Available from: [Link]
4. GeeksforGeeks. Memory Management in Python . Available from: [Link]
in-python/
5. RealPython. Understanding Python Objects and Memory Management . Available from: [Link]
memory-management/
6. W3Schools. Python Strings . Available from: [Link]
7. GeeksforGeeks. Python Data Structures . Available from: [Link]
8. W3Schools. Python Lists, Tuples, Sets, and Dictionaries . Available from:
[Link]
9. RealPython. Python Functions and Exceptions . Available from: [Link]
10. W3Schools. Python Exception Handling . Available from: [Link]
11. AlgoDaily. Association, Aggregation, and Composition in Python OOP . Available from:
[Link]
12. GeeksforGeeks. Python OOP Concepts . Available from: [Link]
Designation Name in Capitals Signature with Date
Dr. G KALYANI
Course Coordinator
Dr. C S PAVAN KUMAR
Head of the Department Dr. M SUNEETHA