Lesson Plan
Name of faculty : Naveen Arora (Lecturer)
Discipline : Computer Engineering
Semester : 5th
Subject : Python
Lesson Plan Duration : 07-09-20 to 05-02-21
Work Load(Lecture/ Practical) per week (in hours): Lectures-03, Practicals – 06
Week Theory Practical
Topic Topic
(including assignment /
test)
1st 1. Getting started with Python and IDLE in
Introduction: interactive and batch modes
Brief History of Python
Python Versions
Installing Python
Environment Variables
Executing Python from the
Command Line
IDLE
Editing Python Files
Python Documentation
Getting Help
Dynamic Types
Python Reserved Words
Naming Conventions
2nd Basic Python Syntax 2. What do the following string methods do?
lower
count
Basic Syntax replace
Comments
String Values
String Methods
The format Method
String Operators
Numeric Data Types
Conversion Functions
Simple Output
Simple Input
The % Method
3rd Language Components 3. Write instructions to perform each of the steps
below
Indenting Requirements (a) Create a string containing at least five
The if Statement words and store it in a variable.
Relational and Logical Operators (b) Print out the string.
Bit Wise Operators (c) Convert the string to a list of words
The while Loop using the string split method.
break and continue (d) Sort the list into reverse alphabetical
The for Loop order using some of the list methods
(you might need to use dir(list) or
help(list) to find appropriate methods).
(e) Print out the sorted, reversed list of
words.
4th Collections 4. Write a program that determines whether the
number is prime.
What is your favorite number? 24
Introduction 24 is not prime
Lists What is your favorite number? 31
31 is prime
5th Tuples 5. Find all numbers which are multiple of 17, but
Sets not the multiple of 5, between 2000 and 2500?
Dictionaries
6th SESSIONAL TEST SESSIONAL TEST
7th Sorting Dictionaries 6. Swap two integer numbers using a temporary
Copying Collections variable. Repeat the exercise using the code
format: a, b = b, a. Verify your results in both
the cases.
8th Functions 7. Find the largest of n numbers, using a user
defined function largest().
Introduction
Defining Your Own Functions
Parameters
Function Documentation
9th Keyword and Optional 8. Write a function myReverse() which receives a
Parameters string as an input and returns the reverse of the
Passing Collections to a string.
Function
Variable Number of Arguments
Scope
10th Functions - "First Class 9.
Citizens" Check if a given string is palindrome or not.
Passing Functions to a Function
map
filter
Mapping Functions in a
Dictionary
Lambda
Inner Functions
Closures
Sessional test
11th Modules 10.
WAP to convert Celsius to Fahrenheit
Modules
Standard Modules - sys
Standard Modules - math
Standard Modules - time
The dir Function
12th Exceptions 11.
(06 Find the ASCII value of charades
Periods)
Errors
Runtime Errors
The Exception Model
Exception Hierarchy
Handling Multiple Exceptions
Raise
assert
13th Input and Output 12.
WAP for simple calculator
Introduction
Data Streams
Creating Your Own Data
Streams
Access Modes
Writing Data to a File
Reading Data From a File
Additional File Methods
Using Pipes as Data Streams
Handling IO Exceptions
14th Classes in Python
REVISION & PRACTICE
Classes in Python
Principles of Object Orientation
Creating Classes
Instance Methods
File Organization
Special Methods
Class Variables
Inheritance
Polymorphism
15th Regular Expressions REVISION & PRACTICE
Introduction
Simple Character Matches
Special Characters
Character Classes
Quantifiers
The Dot Character
Greedy Matches
Grouping
Matching at Beginning or End
Match Objects
Substituting
Splitting a String
Compiling Regular Expressions
Flags
Sessional Test