Professional Documents
Culture Documents
COMPUTER SCIENCE
PRACTICAL PROGRAM LIST 2021-2022
TERM - I
1. Write an interactive menu driven program to apply linear and binary
search for a list of strings using functions.
2. Write a Python program using function to sort the details of Doctors
in descending order of their specialization using bubble sort. The
Doctors detail includes DoctorId, Name and specialization which is
stored as a nested list.
3. Write a Python program which has the function to sort the details of
the Products in ascending order of their price using insertion sort.
The nested list contains the details of the Product such as Pid,
Pname, Qty and price.
4. Write a Python program using function to count the number of words
starting with the vowel in a file Books.txt
5. Write a Python program which has the function to read from the file
Exam.txt and display all the lines which ends with the word “health”.
6. Write a Python program which has the function to read a text file
and display the number of vowels/consonants/uppercase/lowercase
characters in the file.
7. Write a Python program using functions to read from the text file
“Notes.txt” and do the following:
(i) Display the occurrences of the word “this” in the file.
(ii) Write all the lines which starts with ‘A’ on to the file
newfile.txt.
8. Write a Python program using binary file to perform the following
tasks:
(i) Write the information of the car like CarNo,Carname, mileage
and price onto the “CARS.DAT”
(ii) Read from the file and display all the Toyota cars with their
price.
9. Write a Python program to do the following :
(i) Write the information of the directory details like name,
address, areacode and phone number on to the binary file
Telephone.DAT
(ii) Delete all the records where the areacode is “TP101”.
(iii) Read from the file and display the details of all the records
and also to count the number of records present in it.
10. Write an interactive program using functions to enter the
following records in a binary file:”ITEM.DAT” [Item No, Item_Name,
Qty, Price] Number of records to be entered should be accepted
from the user. Read the file to display the total value of stock. Value
of each item to be calculated as Price * Qty.
11. Write a Python program to update the binary file “Mobile.dat”
containing the information about mobile like ModelNo, memorycard,
details and megapixel. The Modelno whose megapixel to be updated
are accepted from the user.
12. Write an interactive Python program to perform the writing
operation on to the csv file “Student.csv”. The details to be written
are Rno, Name, Marks in 5 subjects and Average. Read from the
Student.csv file and display the details of those students whose
Average is above 85.
13. Write a Python program using functions to write the details of
Employee on to the file emp.csv which has the following: Eno,
Name, Designation, Department and Salary. Read from the file and
display the Name and Salary of the Managers who belong to Sales
department.
14. Write a Python program using functions to do the following :
(i) Generate Fibonacci series
(ii) To check whether the passed number is Armstrong or not
15. Write a Python program using functions to do the following :
(i) SHIFT(lst) that would accept a list as argument. The function
should shift the negative numbers of the list to right and the
positive numbers to left without using another list.
(ii) FIRSTHALF(lst) that would shift the first half elements with
the second half of the list.
TERM - II
16. Write an interactive Python program to find the sum of
boundary, non-boundary, left diagonal and right diagonal elements
of a nested List A of size MxN.
17. Write an interactive Python program using the functions
DoPush(Customer), DoPop(Customer) and DoShow(Customer) to
push,pop and display the Customer details like Customer ID, Name,
Phone no from the Stack of Customers.
18. Consider the following tables WORKER and PAYLEVEL and
answer the questions that follows:
TABLE : WORKER
TABLE : PAYLEVEL
20. Consider the following tables SPORTS and COACH and answer
the questions that follows:
TABLE :COMPANY
Table : Celebrity
***********