1. B. Tech. First Year (Semester-2)
Department of CSE (AI/AI&ML) 1
S
N
o
.
Course
Type
BOS Subject
Code Subject Name Type
Academ
ic
Learnin
g (AL)
Continuous
Internal
Examination
(CIE)
End
Sem
Examination
(ESE)
Total
Credits
L T P MSE
CA
TOTA
L
CIE+ES
E
1 BS AS Linear Algebra for Engineers T 3 1 0 80 20 100 100 200 4
2 BS AS Environmental Chemistry T 2 0 0 40 10 50 50 100 2
3 ES CSE Data Structure T 3 0 0 60 15 75 75 150 3
4 ES ECE Computer Organization & Logic Design T 3 0 0 60 15 75 75 150 3
5 ES CSE(AI) Introduction to AI T 2 0 0 40 10 50 50 100 2
Lab/Practical
6 ES ECE Computer Organization & Logic Design
Lab
PBL/ L 0 0 2 - 25 25 25 50 1
7 ES CSE Data Structures Lab PBL 0 0 2 - 25 25 25 50 1
8 ES CSE(AI) Introduction to AI Lab PBL 0 0 2 - 25 25 25 50 1
9 ES CSE(AI Python for Engineers PBL 0 0 4 - 50 50 50 100 2
2. Department of CSE (AI/AI&ML) 2
Python for Engineers
Detailed Syllabus Discussion:
Team Members:
Mr. Anurag Gupta (Course Coordinator)
3. Department of CSE (AI/AI&ML) 3
AI102P - Python for Engineers
Course Type - Practical L-T-P Format 0-0-4 Credits - 2
Weeks: 14 56 Hrs
Teaching : 11.5 weeks 46 Hrs
Assessment : 2.5 weeks 10 Hrs
Course Objective:
Learn Python basic and use of python libraries, and gain hands-on experience in programming, data
analysis, and visualization.
Pre-requisites : Principles of Programming
4. Department of CSE (AI/AI&ML) 4
Course Outcome
CO1
Use Python variables, operators, expressions, blocks, and numeric types to solve computational
problems.
CO2 Apply Python conditional statements, loops, and loop control on real world use cases
CO3
Use Python complex data types (strings, lists, tuples, dictionaries) and functions for efficient data
manipulation and problem-solving.
CO4
Apply Python file operations for reading, writing, manipulating files, and processing structured
data efficiently.
CO5
Develop simple programs utilizing built-in functions of Python packages like Matplotlib, NumPy,
and Pandas.
AI102P - Python for Engineers
Course Type - Blended L-T-P Format 0-0-4 Credits - 2
6. Department of CSE (AI/AI&ML) 6
S.
No.
Module Lectures Details topics Teaching & Assessment Pedagogy
CO
Mapping
1
Introduction
to python
Session 1:
1-2
Introduction to python, Python Variables,
Python Basic operators
3-Easy Level problems,
2-Advanced Level problems
CO1
Session 2:
3-4
Type Conversion, Expressions
3-Easy Level problems
2-Advanced Level problems
Session 3:
5-6
Understanding python blocks, python data
types, Declaring and using numerical data
types: int, float, etc
3-Easy Level problems
2-Advanced Level problems
Session 4:
7-8
Doubt Clearing Session || Revision Lab progress assessment
Session 5:
9-10
CA1_A || Case Study 1 : 2 marks
Grocery Store Calculator ||
Implementation on Google
Colab/Jupyter || Submission on
same day.
AI102P - Python for Engineers
Course Type - Blended L-T-P Format 0-0-4 Credits - 2
7. Department of CSE (AI/AI&ML) 7
S.
No.
Module Lectures Details topics Teaching & Assessment Pedagogy
CO
Mappi
ng
2
Python
Program Flow
Control
Conditional
blocks
Session 6:
11-12
If, else, and else if, simple for loops in
python
3-Easy Level problems,
2-Advanced Level problems
CO2
Session 7:
13-14
For loop using ranges, use of while loops
in python
3-Easy Level problems,
2-Advanced Level problems
Session 8:
15-16
Loop manipulation using pass, continue,
break and else, Programming using
python conditional and loop blocks
3-Easy Level problems,
2-Advanced Level problems
Session 9:
17-18
Doubt Clearing Session/Revision/Lab
progress status
Lab Work Audit
Session
10 :19-20
CA1_B || Case Study 2 : 2 Marks
Number Guessing Game ||
Implementation on Google
Colab/Jupyter || Submission on same
day.
MSE1 & CA1 21-24
19 Marks - 4 hrs
online test on any coding platform
(MCQ and Coding questions).
CO1,
CO2
MSE-1: Online Coding Assessment : 15
Marks
CA1: Viva on case study 1 & 2 submssion
(PBL) : 4 Marks
8. Department of CSE (AI/AI&ML) 8
S.
No.
Module Lectures Details topics Teaching & Assessment Pedagogy
CO
Mappi
ng
3
Python
Complex Data
Types
Session 11:
25-26
Python complex data types, Using string
data type and string operations, Defining list
and list slicing, use of tuple data type, string,
list, and dictionary
3-Easy Level problems,
2-Advanced Level problems
CO3
Session 12:
27-28
Manipulation Building blocks of Python
programs, String manipulation methods,
Declaring and using numerical data types:
int, float, etc
3-Easy Level problems,
2-Advanced Level problems
Session 13:
29-30
String manipulation methods, List
manipulation, Python Functions, Organizing
Python codes using functions
3-Easy Level problems,
2-Advanced Level problems
Session 14:
31-32
Doubt Clearing Session/Revision/Lab
progress status
Lab Work Audit.
Session 15:
33-34
Hands on ( Case Study 3 : 2 marks)
Word Scramble Game ||
Implementation on Google
Colab/Jupyter || Submission on
same day.
9. Department of CSE (AI/AI&ML) 9
S.
No.
Module Lectures Details topics Teaching & Assessment Pedagogy
CO
Mapping
4
Python File
Operations
Session 16:
35-36
Python file operations: reading files,
writing files in Python
3-Easy Level problems,
2-Advanced Level problems
CO4
Session 17:
37-38
Understanding read functions, read(),
read line(), read lines(), write() and write
lines()
3-Easy Level problems,
2-Advanced Level problem
Session 18:
39-40
Manipulating file pointers using seek
Programming, using file operations
3-Easy Level problems,
2-Advanced Level problem
Session 19:
41-42
Doubt Clearing Session/Revision. Lab Work Audit
Session 20:
43-44
PBL: Hands on ( Case Study 4)
Employee Attendance
Management System || submission
same day
MSE2 & CA2 45-48
19 Marks - 4 hrs
online test on any coding
platform (MCQ and Coding
questions).
.
CO3,
CO4
MSE-2: Online Coding Assessment : 15
Marks
CA-2: Viva on case study 3 & 4
submission (PBL) : 4 Marks
10. Department of CSE (AI/AI&ML) 10
S.
No.
Module Lectures Details topics Teaching & Assesment Pedegogy
CO
Mappin
g
5
Python
Packages
Session
21/49-50
Using built-in functions of packages
Matplotlib
3-Easy Level problems,
2-Advanced Level problems
CO5
Session
22/51-52
Using built-in functions of packages
NumPy, Pandas
Session
23/53-54
Hands on - ( Case Study 5 : 4 Marks)
Case Study 5: Students exam score Analysis ||
Implementation on Google Colab/Jupyter ||
Submission on same day.
CA 3 55-56
CA3-12 Marks: End Semester Lab Completion
(7 marks ) and
Case Study 5 (5 Marks)
5 Marks on the End Semester Lab
Completion status (on Google Colab, Jupyter
or any other coding platform) and 4 Marks
on Case Study 5
End Semester Examination (ESE) || online
50 Marks (Centralized)
online test on any coding platform
(MCQ and Coding questions).
CO1, CO2,
CO3,
CO4, CO5
11. Department of CSE (AI/AI&ML) 11
Evaluation Scheme:
Exam Marks Details
MSE-1 &
MSE-2
15 each
Coding assessment on an online platform
5 MCQ : 5 Mark
2 debugging questions : 4 Marks
3 programming questions : 1 easy, 1 medium, 1 advance level and partial marks will be awarded on the basis
of passed hidden test cases : Total 6 Marks
CA1 4
For Case Study 1 and Case Study 2
(Understanding of code-2 Marks and
File System - Code & ReadME file on github/Moodle-2 Marks)
CA2 4
For Case Study 3 and Case Study 4
(Understanding of code-2 Marks and
File System - Code & ReadME file on github/Moodle-2 Marks)
CA3
12
Case Study 5 (5 Marks)
(Understanding of code-3 Marks and
File System - Code & ReadME file on github/Moodle-2 Marks)
End Semester Lab Completion (7 marks )
91% and abvoe-7 Marks
81%-90%-6 Marks
71%-80%-5 Marks
12. Department of CSE (AI/AI&ML) 12
CASE STUDIES
Sno Case Study Scenario Topics Covered Task
1
Grocery Store
Calculator
A grocery store wants to calculate
the total cost of items purchased
by a customer.
Variables, Operators,
Type Conversion
Calculate the total cost of 3 different items. Add a
discount of 10% if the total exceeds $50.
2
Number
Guessing
Game
Create a simple number guessing
game.
If, else, elif, while loop
Generate a random number between 1 and 100. Allow
the user to guess the number, providing hints if the
guess is too high or too low. End the game when the
user guesses correctly.
3
Word
Scramble
Game
Develop a game where the user
unscrambles letters to form a word
Strings, lists,
randomization
Predefine a list of words and scramble them.
Allow the user to guess the original word.
Display the correct answer if the guess is wrong.
4
To-Do Notes
Builder
Build a note-taking app where
users can create, view, and append
notes.
File handling
Create a new file using write() to store the notes.
Allow appending new notes using write() or
writelines(). Display all notes using read() or
readlines(). Use seek() to navigate and re-read
specific sections of the notes.
5
Analyzing
Student Exam
Scores
Analyze student exam scores
using basic statistics.
Pandas, NumPy,
MatplotLib
Use Pandas to load a dataset of student names and
scores. Calculate the average, highest, and lowest
scores using NumPy, and display a bar chart of
student scores using MatplotLib.
14. Department of CSE (AI/AI&ML) 14
SESSION LEVEL LIST OF PROGRAMS
Session
1
Easy
Write a Python program to input two numbers and display their sum.
Create a program that calculates the square of a number the user enters.
Write a script to print the current date and time in Python.
Advanced
Create a Python program that takes user input to calculate the Body Mass Index (BMI) and categorizes it (e.g.,
underweight, normal, overweight, obese).
Write a Python script that simulates a basic calculator with functions for addition, subtraction, multiplication,
and division.
Session
2
Easy
Write a Python program to convert a given integer to a string and check its type before and after conversion.
Create a script to take user input as a string, convert it to a float, and calculate its square root.
Write a program that converts a given list of strings (["1", "2", "3"]) into a list of integers and computes their
sum.
Advanced
Create a program that dynamically determines the type of user input and performs appropriate type
conversion (e.g., integer, float, or string) to store it in a list categorized by type.
Write a program to show explicit type conversion using built-in functions for a user input number or string
Session
3
Easy
Write a program to print all even numbers between 1 and 20.
Write a function to calculate the area of a circle, given the radius.
Write a program to determine if a year is a leap year.
Advanced
Write a Python program that uses nested blocks to calculate the sum of all even numbers and odd numbers
from a user-provided list of integers.
Write a recursive function to generate all subsets of a given set.
15. Department of CSE (AI/AI&ML) 15
Session 4 & 5 Doubt Clearing Session/Revision/PBL
Session
6
Easy
Write a Python program to check if a given number is positive, negative, or zero using if-else statements.
Create a program to input a student's marks and print "Pass" if the marks are greater than or equal to 40;
otherwise, print "Fail.
"Write a Python program that checks whether a number is divisible by both 3 and 5 using if-elif-else.
Advanced
Develop a program to simulate a grading system. Take input for marks and print the grade based on the
following ranges: A: 90–100B: 80–89C: 70–79F: Below 70
Design a Python program that calculates the income tax for multiple individuals based on their annual income.
Use the following tax slabs: Income <= 2,50,000: No tax
Income > 2,50,000 and <= 5,00,000: 5% tax on the amount exceeding 2,50,000
Income > 5,00,000 and <= 10,00,000: 20% tax on the amount exceeding 5,00,000 + tax from the previous slab
Income > 10,00,000: 30% tax on the amount exceeding 10,00,000 + tax from the previous slabs
Session
7
Easy
Write a Python program that uses a for loop with range() to calculate and print the sum of all numbers from 1
to 100.
Create a Python script that takes an integer input from the user and uses a for loop with range() to print the
multiplication table for that number up to 10.
Write a program that uses a while loop to print a countdown from 10 to 1 and then prints "Blast off!" after the
countdown.
Advanced
Write a Python program that asks the user for two integers and uses a for loop with range() to print all prime
numbers between the two integers. Ensure to handle edge cases like negative numbers or the same number
entered twice.
Develop a Python script that generates the Fibonacci series up to a number specified by the user. Use a while
loop to calculate each term in the series and print the sequence. For example, if the user inputs 50, the program
should output all Fibonacci numbers less than or equal to 50.
16. Department of CSE (AI/AI&ML) 16
SESSION LEVEL LIST OF PROGRAMS
Session
8
Easy
Write a Python program that uses a for loop to print all even numbers from 1 to 20. Use the continue
statement to skip odd numbers.
Create a program that asks the user to input numbers repeatedly. If the user enters a negative number, break
the loop and print "Negative number detected. Exiting."
Write a Python program that searches for the number 10 in a list using a for loop. If the number is found,
print "Found 10!" and break the loop. If the loop completes without finding 10, print "10 not found."
Advanced
Develop a Python script where the user has to guess a randomly generated number between 1 and 50. Use a
while loop to allow repeated attempts, continue to prompt the user again if they enter invalid input (e.g., non-
numeric), and break when the correct number is guessed. Provide feedback ("Too high!" or "Too low!") for
incorrect guesses.
Process a list of integers with the following rules:
Skip numbers less than 50 or divisible by both 4 and 6 (continue).
Stop the loop if a number greater than 300 is encountered (break).
For numbers divisible by 100, include a placeholder (pass).
If the loop completes without a number greater than 300, print a success message (else).
Print each valid number as: Valid number: {number}
Session 9 & 10 Doubt Clearing Session/Revision/ PBL
17. Department of CSE (AI/AI&ML) 17
SESSION LEVEL LIST OF PROGRAMS
Session
11
Easy
Write a Python program to: take a string input from the user, count the number of vowels in the string and
reverse the string and print the result.
Create a list of integers from 1 to 20, print the first 5 elements of the list, print the last 5 elements and reverse the
list and print it.
Write a program that Creates a dictionary with keys as student names and values as their scores, add a new key-
value pair to the dictionary, retrieve and print the score of a specific student given their name.
Advanced
Write a program that:
Takes a paragraph as input.
Counts the frequency of each word in the paragraph and stores it in a dictionary.
Sorts the dictionary by word frequency and prints the top 5 most frequent words.
You are given a dataset of employees in the form of a list of tuples:
employees = [
("John", 28, "Developer"),
("Alice", 32, "Designer"),
("Bob", 25, "Data Scientist"),
]
Convert this list of tuples into a nested dictionary where each key is the employee's name, and the value is another
dictionary containing their age and job role.
Add a new employee to the dictionary.
Print the details of all employees in a readable format.
Session 12
Easy
Write a Python program to reverse a string entered by the user.
Create a list of integers and find the sum of all elements.
Take two float numbers as input, multiply them, and display the result.
Advanced
Write a program to count the frequency of each character in a string and display the result in a dictionary.
Take a mixed list of integers, floats, and strings; separate and categorize them by data type, then display the
18. Department of CSE (AI/AI&ML) 18
SESSIO
N
LEVEL LIST OF PROGRAMS
Session
13
Easy
Write a Python program to find the number of words in a string.
Create a list of integers, remove all even numbers, and print the modified list.
Define a function to calculate the square of a given number and call it with user input.
Advanced
Write a program that reads a string S
and finds the first repeating character in the string. If a repeating character is found, print the character and
stop searching using break statement. If no repeating character is found, print -1
.
Input format:
The first line of input will contain a string S.
.
Output format:
The output should consist of the first repeating character in the string, or -1
if no repeating character is found.
Create a function that takes a list of numbers, sorts it in ascending order, and removes duplicates, returning
the modified list.
Session 14 & 15 Doubt Clearing Session/Revision/PBL
19. Department of CSE (AI/AI&ML) 19
SESSIO
N
LEVEL LIST OF PROGRAMS
Session
16
Easy
Write a Python program to count the total number of words and lines in a file using read() and split().
Create a program that reads a file and prints only lines that contain a specific keyword (case-insensitive
search).
Read a file and reverse the order of its lines before printing them to the console.
Advanced
William wants to search for a specific word in a text file. He needs a Python program to prompt the user to
enter the name of the input file and the word to search for. If the file exists, the program searches for the
specified word in the file. If the word is found, it prints the starting index of that word in the file; otherwise, it
prints a message indicating that the word is not found. Assume that the input file exists always.
Input Format:
The first line contains the name of the input file, and the second line contains the word to search for.
Output Format:
The program prints the starting index of the word in the file if it is found. Otherwise, it prints "not found".
Maya wants to transform the content of a text file, making all letters uppercase. She needs a Python program
to read the content of the file, convert all letters to uppercase, and print the transformed content. Implement
the program to assist Maya in converting all letters of the file content to uppercase.
Input format:
The input is the file name
Output format:
The program prints the content of the file after converting all letters to uppercase.
Note: Always assume that the given file exists.
20. Department of CSE (AI/AI&ML) 20
SESSION LEVEL LIST OF PROGRAMS
Session
17
Easy
Write a Python program to copy the contents of one file into another but reverse the order of characters in
each line.
Create a program that writes a list of dictionaries into a file in JSON-like format (but not using the json
module).
Append a user-provided string to a file, but only if it does not already exist in the file.
Advanced
John is a teacher who wants to analyze the grades of his students. He has stored the grades in a text file, with
each student's grade separated by a comma. The grades range from 0 to 100. John needs a Python program to
calculate the file's average, highest, and lowest grades. Implement the program to help John with his analysis.
Assume that the input file always exists with proper data.
Input format:
The input is the file name.
Output format:
The output prints the average up to 1 decimal place, highest, and lowest grades respectively in separate lines.
Alex wants to merge the contents of two text files into a single file. He has two files. Alex needs a Python
program to read the contents of both files and concatenate them into a new file. Print the contents of the
merged file. Implement the program to help Alex merge the files. Always assume that the input file exists.
Input format:
The input is the names of the two files in separate lines.
Output format:
The program creates a new file containing the concatenated contents of the input files and prints the merged
content.
21. Department of CSE (AI/AI&ML) 21
SESSION LEVEL LIST OF PROGRAMS
Session
18
Easy
Write a program that reads a file in chunks of 50 characters and prints each chunk, ensuring no overlap
between reads.
Create a program that reads the last n characters of a file, where n is provided by the user.
Write a program to move the file pointer to a specific line number (user-provided) and print that line. If the
line does not exist, print a custom error message.
Advanced
John has a text file containing words. He wants to process the file by replacing all the vowels (a, e, i, o, u) in
each word with their ASCII values. The modified content of the file should then be printed line by line.
Write a Python program that reads the file, replaces all the vowels in each word with their ASCII values, and
prints the updated content.
Input Format:
The input is the file name containing words, one per line.
Output Format:
Print the modified file content directly, where all vowels in each word are replaced with their corresponding
ASCII values.
John has a text file containing words each in a line. He wants to modify each word by swapping its second and
last characters to see how the words look. Write a Python program that reads the file, swaps the second and
last characters of each word, and prints the updated content line by line.
Input Format:
The input is the file name containing words, one per line.
The program swaps the second and last characters of each word.
Output Format:
Print the modified file content directly, where the second and last characters of each word are swapped.
Note: Use the strip() method to remove any leading or trailing whitespace or newline characters from each line
before processing.
22. Department of CSE (AI/AI&ML) 22
SESSION LEVEL LIST OF PROGRAMS
Session 19 & 20 Doubt Clearing Session/Revision/PBL
Session
21
Easy
Create a line chart to visualize the relationship between years (2010–2020) on the x-axis and sales figures on
the y-axis, with labeled axes and a title.
Plot a bar chart showing the population of five countries. Add different colors to each bar and display the
values on top of the bars.
Generate a scatter plot with random data points (use numpy for random values), add a legend, and color-
code the points based on categories.
Advanced
Advanced Matrix Manipulation: Generate a large matrix (e.g., 1000x1000) of random integers using NumPy.
Write a program to:
Compute the eigenvalues and eigenvectors of the matrix.
Identify rows and columns with the highest and lowest mean values.
Simulating Data: Use NumPy to simulate the roll of two dice 10,000 times. Calculate and display:
The frequency distribution of the sums.
The probabilities of each sum appearing.
23. Department of CSE (AI/AI&ML) 23
SESSIO
N
LEVEL LIST OF PROGRAMS
Session
22
Easy
Use NumPy to generate a 5x5 matrix of random integers between 1 and 100. Find and print the mean,
median, and standard deviation of the matrix.
Create a Pandas DataFrame with columns "Name," "Age," and "Score" for five students. Sort the
DataFrame by "Score" in descending order and display the result.
Using Pandas, load a CSV file of your choice and: Print the first 5 rows.
Calculate and display the average of a numeric column.
Create a new column that categorizes rows based on a threshold value from an existing numeric column.
Advanced
Data Analysis: Load a dataset (e.g., a CSV file of housing prices) and:
Calculate correlations between numerical columns.
Identify outliers in the data using the IQR method and visualize them with a box plot.
Data Transformation: Given a time-series dataset (e.g., daily temperatures for a year), write a program
to:
Resample the data to calculate monthly averages.
Fill missing values using forward fill.
Create a line plot comparing daily and monthly trends.
24. Department of CSE (AI/AI&ML) 24
List of Text Book & References:
Text Book:
1 Python: The Complete Reference Paperback – 20 March 2018 by Martin C. Brown (Author)
2 Let Us Python - 4th Edition 2022 by Yashavant Kanetkar (Author)
3 Core Python Programming 2021 by R. Nageswara Rao (Author)
References:
1 https://onlinecourses.nptel.ac.in/noc21_cs32/preview
2 https://onlinecourses.nptel.ac.in/noc22_cs32/preview
3 https://onlinecourses.swayam2.ac.in/cec22_cs20/preview
4 https://www.udemy.com/course/pythonforbeginnersintro/
5 https://onlinecourses.nptel.ac.in/noc22_cs32/preview