Department of Artificial Intelligence
Python Programming
COURSE HANDOUT (2025-26) R24
1
1. Course Name :Python Programming
2. Course Code : EMA2X15
3. Course Category : Theory and Practical
4. Course Coordinator : Rajesh Myakala, Assistant Professor
5. Course Instructors : Dr. L. Sridhar Rao , Dr. Pardeep Kumar,
Mrs. Madhavi ,
2
Academic Calendar:
3
Python Programming
B. Tech (AI) II Year I Semester Dept. of Artificial Intelligence
Code Category Hours/Week Credits Marks%
Theoretical& L T P C CIE SEE Total
EMA2X15
Practical(PC) 3 0 4 5 50 50 100
Course Outcomes
At the end of this course, students will be the able to
1. Develop skills in handling control flow using conditionals and loops.(L4)
2. Analyze various String handling functions and data structures.(L4)
3. Design programs on object- oriented programming concepts.(L4)
4. Solve the problems by using Inheritance and polymorphism.(L3)
5. Illustrate programs on Exception Handling and various packages.(L3)
UNIT I
Introduction to Python: Features of Python literal constants, variables and identifiers, Data
Types, Operators, Expressions, type conversions.
Decision control statements: Conditional branching statements, loop structures / iterative
statements, nested loops, break, continue and pass statements, Standard I/O Operations.
Functions and Modules: Declaration and Definition, Function Calling, More on Defining
Functions, Recursive Functions, Modules and Packages
UNIT II
Strings and Regular Expressions: String Operations, Built-in String Methods and Functions,
slice operation, functions in Regular Expression.
Sequence: List: Introduction, nested list, list operations, list comprehensions.
Tuples: Introduction, basic operations, advantages of Tuple over list.
Mappings: Dictionaries, Sets: Introduction and operations, Frozen set, Byte, Byte array.
UNIT III
Object Oriented Programming: Introduction to Object Oriented Programming, Features of
OOP, Merits and demerits of Object Oriented Programming Languages, Applications of
OOP
Implementation of classes and objects: Classes and Objects, Class Method and Self
4
Argument. The _init_ method, Class Variables and Object Variables, the del method, Public
and Private Data Members, Private Methods, Built-in Functions to Check, Get, Set and
Delete Class Attributes, Garbage Collection (Destroying Objects).
UNIT IV
Implementation of Inheritance in Python: Inheriting Classes in Python, Types of Inheritance,
Abstract Classes.
Operator Overloading in Python: Introduction, Implementing Operator Overloading,
Overriding Methods.
Exception Handling in Python: Introduction, Exception hierarchy, Handling Exception,
Multiple Except Blocks and Multiple Exceptions, Finally Block.
UNITV
NumPy: NumPy NDarray, Data Types, Functions of NumPy Array, Mathematical
Functions on Arrays in NumPy.
Pandas: Pandas Features, Dataset in Pandas, Data Frames, Manipulating the Datasets,
Describing a Dataset, group by Function, Filtering, Missing Values in Pandas,
Concatenating Data Frames. Import data from csv file.
Introduction to Matplotlib: Plot, Scatterplot, Introduction to Tkinter, Date and Time Packages.
TextBooks
1. ReemaThareja,PythonProgrammingusingProblemSolvingApproach,SecondEdition,Oxfor
d Higher Education, 2022
2. JamesPayne,BeginningPythonusingPython2.6andPython3,1stEdition,2014
ReferenceBooks
1. CharlesDierach,IntroductiontoComputerScienceusingPython,2013
OnlineResources
1. https://www.programiz.com/python-programming
2. https://www.javatpoint.com/python-tutorial
3. https://www.geeksforgeeks.org/python-programming-language
4. https://sites.google.com/anurag.edu.in/python/home
5
Python Programming Lab
Course Outcomes
At the end of this Lab course, students will be the able to
1. Develop skills in handling control flow using conditionals and loops.(L4)
2. Analyze various String handling functions and data structures.(L4)
3. Design programs on object-oriented programming concepts.(L4)
4. Solve the problems by using Inheritance and polymorphism.(L3)
5. Illustrate programs on Exception Handling and various packages.(L3)
List of Experiments
Exp-1
1) Installation and Environment setup of Python & Programs on Data types.
Exp-2
2) Programs on Standard I/O, Operators and Expressions.
Exp-3
3) Programs on Functions.
Exp-4
4) Programs on lists and Tuples.
Exp-5
5) Programs on Dictionaries.
Exp-6
6) Programs on Strings and string operations.
Exp-7
7) Programs on Regular Expressions.
Exp-8
8) Programs on Inheritance and Polymorphism.
Exp-9
9) Programs on Exception Handling.
6
Exp-10
10) Demonstration of Numpy Package.
Exp-11
11) Demonstration of Pandas Package.
Exp-12
12) Demonstration of matplotlib Package and Tkinter Package.
Exp-13
13) Demonstration of Date and Time Packages.
Exp-14
Review
7
Programme Outcomes (PO’s)
PO-1: Engineering knowledge:
Apply the knowledge of mathematics, science, engineering fundamentals, and an
engineering specialization for the solution of complex engineering problems.
PO-2: Problem analysis:
Identify, formulate, review research literature and analyze complex engineering problems
reaching substantiated conclusions with consideration for sustainable development.
PO-3: Design/Development of Solutions:
Design creative solutions for complex engineering problems and design/develop
systems/components/processes to meet identified needs with consideration for the public
health and safety, whole-life cost, net zero carbon, culture, society and environment as
required.
PO-4: Conduct Investigations of Complex Problems:
Conduct investigations of complex engineering problems using research-based knowledge
including design of experiments, modelling, analysis & interpretation of data to provide
valid conclusions.
PO-5: Engineering Tool Usage:
Create, select and apply appropriate techniques, resources and modern engineering & IT
tools, including prediction and modelling recognizing their limitations to solve complex
engineering problems.
PO-6: The Engineer and The World:
Analyze and evaluate societal and environmental aspects while solving complex
engineering problems for its impact on sustainability with reference to economy, health,
safety, legal framework, culture and environment.
8
PO-7: Ethics:
Apply ethical principles and commit to professional ethics, human values, diversity and
inclusion; adhere to national & international laws.
PO-8: Individual and Collaborative Team work:
Function effectively as an individual, and as a member or leader in diverse/multi-
disciplinary teams.
PO-9: Communication:
Communicate effectively and inclusively within the engineering community and society at
large, such as being able to comprehend and write effective reports and design
documentation, make effective presentations considering cultural, language, and learning
differences.
PO-10: Project Management and Finance:
Apply knowledge and understanding of engineering management principles and economic
decision-making and apply these to one’s own work, as a member and leader in a team,
and to manage projects and in multi disciplinary environments.
PO-11: Life-Long Learning:
Recognize the need for, and have the preparation and ability for
i. independent and life-long learning
ii.adaptability to new and emerging technologies
iii.Critical thinking in the broadest context of technological change.
Programme Name: B. Tech Artificial Intelligence
PEO 1: Successful Careers in AI and Allied Fields
Graduates will establish themselves as professionals in industries, research, or
academia by applying core principles of Artificial Intelligence, mathematics, and computer
science to solve complex, real-world problems.
9
PEO 2: Lifelong Learning and Technical Advancement
Graduates will continuously enhance their technical skills and knowledge through
advanced studies, certifications, or self-learning to stay updated with emerging tools,
technologies, and trends in AI.
PEO 3: Innovation and Entrepreneurship
Graduates will contribute to the development of innovative solutions or AI-based
products, either as entrepreneurs or key contributors in startups or enterprises, fostering
technological and economic growth.
PEO 4: Ethical Leadership and Societal Contribution
Graduates will demonstrate leadership with a commitment to ethical practices,
legal responsibilities, and positive societal impact in the design and deployment of AI
systems.
PSO 1: Core AI Competency
Apply principles of mathematics, statistics, and computer science to design and develop
intelligent systems using techniques such as machine learning, deep learning, natural
language processing, and computer vision.
PSO 2: Real-world Problem Solving
Identify, formulate, and solve complex real-world problems by implementing AI
models, algorithms, and data-driven solutions in domains such as healthcare, finance,
robotics, and smart systems.
PSO 3: Tools and Technologies Proficiency
Demonstrate proficiency in using modern AI tools, programming languages (such
as Python, R), and frameworks (such as TensorFlow, PyTorch, Keras, OpenCV) to build,
train, and deploy AI models.
PSO 4: Ethics and Social Impact
Evaluate the ethical, legal, and societal implications of deploying AI systems and
ensure responsible AI practices that promote fairness, transparency, and inclusiveness.
10
Programme Name: B. Tech Artificial Intelligence and Machine Learning
PEO 1: Professional Excellence in AI & ML
Graduates will establish successful careers in industry, academia, or research by
applying foundational and advanced concepts in Artificial Intelligence and Machine
Learning to solve complex technical problems.
PEO 2: Continuous Learning and Adaptability
Graduates will engage in lifelong learning to enhance their skills and knowledge
through higher studies, professional certifications, or independent learning in evolving AI
& ML technologies.
PEO 3: Innovation and Entrepreneurship
Graduates will contribute to innovation and the development of AI/ML-driven
products, solutions, or services as entrepreneurs or key contributors in startups, research
labs, or industries.
PEO 4: Ethical and Responsible AI Practice
Graduates will demonstrate ethical responsibility, data integrity, and social
consciousness while designing and deploying AI and ML systems for societal benefit and
sustainable development.
PSO 1: Foundation in AI & ML Principles
Apply the fundamentals of mathematics, statistics, data structures, and algorithmic
thinking to understand, analyze, and develop AI and machine learning-based solutions.
PSO 2: Design and Development of Intelligent Systems
Design, develop, and deploy intelligent systems using machine learning, deep
learning, natural language processing, and data analytics techniques to solve real world
problems across various domains.
PSO 3: Proficiency in Tools and Technologies
Gain expertise in using contemporary programming languages (such as Python, R,
Java) and AI/ML frameworks and tools (such as TensorFlow, Keras, PyTorch, Scikitlearn,
and OpenCV) for building and optimizing intelligent applications.
11
PSO 4: Research, Innovation, and Product Development
Demonstrate research aptitude and innovation to create AI/ML-driven products and
solutions, contributing to scientific advancement, entrepreneurship, and technological
development.
Course Articulation Matrix:
The CO-PO mapping is represented using a scale of 1 to 3, indicating the strength of the
correlation:
1 –Low Correlation: The Course Outcome contributes minimally to the Program Outcome.
2 –Moderate Correlation: The Course Outcome contributes reasonably to the Program
Outcome.
3- High Correlation: The Course Outcome has a strong influence on the Program
Outcome.
"-" indicates that there is no direct or measurable correlation between the CO and
PO.
CO-PO Articulation Matrix
Program Outcome’s Program Specific
Outcome’s
CO PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PSO1 PSO2 PSO3 PSO4
CO1 3 2 1 3 1 3 2 3
CO2 3 2 1 3 1 3 2 3
CO3 3 2 2 3 1 3 3 3 2
CO4 3 3 3 3 1 1 2 3 3 3 2
CO5 3 3 3 2 3 1 1 2 2 2 3 3 3 3
12
COURSE SCHEDULE
Distribution of Hours Unit–Wise
Total
Unit Topic No. of Hours
Preface Course Objectives, Course Outcomes, handout discussion
I Introduction to Python, Functions and Modules 10
II Strings and Regular Expressions, Sequence 12
Object Oriented Programming, Implementation of
III 08
classes and objects
IV Implementation of classes and objects, Exception 08
Handling in Python
V NumPy, Pandas , Introduction to Matplotlib 07
TOTALCLASSES - 45
13
LECTURE PLAN
Week Uni Lectur Detailed Topic delivery with sub Expect Date Text Teaching
No. t e No. topics included ed of Book / Aid
No. date of Compl Refere
compl etion nces
etion
1 Introduction to Python: Features, T1 Chalk and
Applications, Strengths, Board/PP
Week - 1
Weaknesses T
2 Data Types: Numeric (int, float, T1 Chalk and
complex), Boolean, Strings Board/PP
T
3 Operators: Arithmetic, T1 Chalk and
Comparison, Logical, Bitwise, Board/PP
Operator Precedence T
4 Expressions and Type Conversion, T1 Flipped
Control statements: if, elif, else, Class
nested if Room
week-2
5 Control Statements: for loop, while T1 Chalk and
loop, break, continue, pass Board/PP
Unit-1
T
6 Standard I/O Operations: input(), T1 Chalk and
print(), Formatted Output Board/PP
T
7 Functions: Declaration, Definition, T1 Chalk and
Calling, Arguments (Positional, Board/PP
Keyword) T
week-3
8 Functions: Default Arguments, T1 Chalk and
Return Statement, Scope (Local, Board/PP
Global), Lambda and Recursive T
Functions
9 Modules: Introduction, Importing, T1 Chalk and
Built-in Modules Board/PP
T
10 Packages in Python: Introduction, T1 Chalk and
Creating and Importing Board/PP
T
TLP Activity: Identification of Basic elements in python language
week-4
Description: Students able to understand usage of python software and also implement basic
elements.
11 Strings: Operations T1 Chalk and
(Concatenation, Repetition, Board/PP
Unit-2
Slicing), Immutability T
12 Strings: Built-in Methods and T1 Chalk and
Functions Board/PP
T
14
13 Regular Expressions: Introduction, T1 Chalk and
Basic Syntax and Meta characters Board/PP
Week-5
T
14 Regular Expressions: Functions T1
PBL
(search, match, findall, sub)
15 Sequence: Lists - Introduction, T1 Chalk and
Operations (Accessing, Slicing, Board/PP
Modifying) T
16 Sequence: Lists - Methods T1 Chalk and
Board/PP
T
week-6
17 Sequence: Tuples - Introduction, T1 Chalk and
Operations (Accessing, Slicing) Board/PP
T
18 Sequence: Tuples - Methods, T1 Chalk and
Tuples vs. Lists Board/PP
T
19 Sequence: Dictionaries - T1 Chalk and
Introduction, Operations Board/PP
(Accessing, Adding, Deleting) T
week-7
20 Sequence: Dictionaries - Methods T1 Chalk and
Board/PP
T
21 Sequence: Sets - Introduction, T1 Chalk and
Operations (Union, Intersection, Board/PP
Difference) T
22 Sequence: Sets - Methods, T1 Chalk and
Frozenset, Byte, ByteArray Board/PP
T
TLP Activity: Identification & Comparison of Basic Data structures in python language
Week 8
Description: Students able to perform string operations and also implement basic data
structures.
23 Introduction to OOP: Features, T1 Chalk and
Merits, Demerits, Applications Board/PP
T
24 Classes and Objects: Introduction, T1 Chalk and
Defining Classes, Creating Objects Board/PP
unit-3
T
25 Classes and Objects: Class Method, T1 Flipped
Self Argument, Instance Methods Class
Week 9
Room
26 The __init__ Method (Constructor) T1 Chalk and
Board/PP
T
27 Class Variables and Object T1 Chalk and
15
Variables Board/PP
T
28 The __del__ Method (Destructor), T1 Chalk and
Garbage Collection (Overview) Board/PP
T
week-10
29 Public and Private Data Members, T1 Chalk and
Private Methods, Built in Functions Board/PP
T
30 Built-in Functions to Check, Get, T1 Chalk and
Set, Delete Class Attributes Board/PP
T
TLP Activity: Identification of OOPs features & usage of object variable in python language
Description: Students able to implement method in different ways and also deals with
attributes.
31 Inheritance: Introduction, T1 Chalk and
Inheriting Classes Board/PP
T
Week 11
32 Inheritance: Types of Inheritance T1 Flipped
(Single, Multiple - Overview) Class
Room
33 Inheritance: Types of Inheritance T1 Chalk and
(Multilevel - Overview), Abstract Board/PP
Classes (Introduction) T
34 Inheritance: Interfaces T1 Chalk and
(Conceptual), Meta class Board/PP
(Introduction) T
Unit-4
35 Operator Overloading: T1 Chalk and
week-12
Introduction, Implementing Basic Board/PP
Operators T
36 Overriding Methods, super(), T1 Chalk and
Exception Handling: Introduction, Board/PP
Exception Hierarchy, try-except T
block
37 Exception Handling: Multiple T1 Flipped
Except Blocks, Handling Multiple Class
Exceptions Room
Week 13
38 Exception Handling: Finally Block, T1 Chalk and
Raising Exceptions (Introduction) Board/PP
T
TLP Activity: Identification of operator overloading & usage of Exception handling
techniques in python language
Description: Students able to implement exception handling techniques in python
programming.
16
39 Python NumPy: NumPy ND array T1 Chalk and
(Introduction), Board/PP
T
40 Data Types (Overview),Functions T1 Chalk and
of NumPy Array Board/PP
T
week-14
41 Mathematical Functions on Arrays T1 Chalk and
in NumPy Board/PP
T
unit-5
42 Python Pandas: Pandas Features T1 Chalk and
(Brief), Dataset in Pandas, Data Board/PP
Frames T
43 Manipulating the Datasets, T1 Flipped
Describing a Dataset, group by Class
Function Room
week-15
44 Filtering, Missing Values in T1 Chalk and
Pandas, Concatenating Data Board/PP
Frames. Import data from csv file. T
45 Introduction to Matplotlib, Tkinter, T1 Chalk and
Date and Time Packages (Brief Board/PP
Overviews) T
TLP Activity: Identification of Functions of NumPy and Pandas Features
Description: Students able to implement Functions of NumPy(Arrays) techniques and got
basic knowledge Pandas, Datasets, Data Frames, Mat plotlib, Scatter plot in python
programming.
17
EVALUATION SCHEME
Nature of Max
S. No Evaluation Components Component Duration Marks Date of Conduction
11.08.2025 to
1 MIDI 1,2 Units Closed Book 60minutes 20
13.08.2025
27.09.2025 to
2 MID II 3,4 Units Closed Book 60minutes 20
7.10.2025
NPTEL
certification/ Four or eight Need to submit before
3 Evaluation I Closed Book 10
unit-5 weeks second mid
assessment
Semester End 1,2,3,4,5 150 10.112025 to
4 Examination Units Closed Book minutes 50 22.10.2025
RAJESH MYAKALA Dr. L. Sridhar Rao Dr. A. Mallikarjuna Reddy
Assistant Professor Convener
Course Coordinator PAC - AIML Chairperson & HoD - AI
18