F.
No: DrTTIT/IQAC/2025-26/065P
Department of Computer Science and Engineering
Question Bank
1) Write a python program to read 2 numbers from the keyboard and perform the basic
arithmetic operations based on the choice
2) Write a program to read the name and year of birth of a person. Display whether the
person is a senior citizen or not.
3) Write a program to generate Fibonacci sequence of length(N). Read N from the console.
4) Write a python program to create a list and perform the following operations.
5) Read N numbers from the console and create a list. Write a program to print mean, variance and
standard deviation with suitable messages.
6) Read a multi-digit number(as chars) from the console. Write a program to print the frequency of
each digit with a suitable message.
7) Write a program to print 10 most frequently appearing words in a text file.
8) Write a program to read 6 subject marks from the keyboard for a student. Generate a report that
displays the marks from the highest to the lowest score attained by the student. [Read the marks
into a 1-Dimesional array and sort using the Bubble Sort technique].
9) Write a program to sort the contents of a text file and write the sorted contents into a separate
text file.[Hint: Use string methods strip(), len(), list methods sort(), append(), and file methods
open(), read lines(), and write()].
10) Write a function named DivExp which takes TWO parameters a, b, and returns a value c (c=a/b).
Write a suitable assertion for a>0 in the function DivExp and raise an exception for when b=0.
Write a suitable program that reads two console values and calls the function Div Exp.
11) Define a function that takes TWO objects representing complex numbers and returns a new
complex number with the sum of two complex numbers. Define a suitable class ‘Complex’ to
represent the complex number. Write a program to read N (N >=2) complex numbers and to
compute the addition of N complex numbers.
12) Text Analysis Tool: Build a tool that analyses a paragraph: frequency of each word, longest word,
number of sentences, etc.
13) Write a Data Summary Generator: Read a CSV file (like COVID data or weather stats), convert
to dictionary form, and allow the user to run summary queries: max, min, average by column.
14) Write Program to track Student Grade: Accept multiple student’s names and marks. Store them in
a list of tuples or dictionaries. Display summary reports(average, topper, etc.).
15) Write a program to display contents of a folder recursively (Directory) having sub- folders and
files (name and type).