Professional Documents
Culture Documents
Prac Ques Class Xii
Prac Ques Class Xii
SCHOOL
CLASS : XII
COMPUTER SCIENCE
PRACTICAL PROGRAM LIST
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 functions to create a text file
“Story.txt”, read lines from the text file “Story.txt” and display
those words whose length is less than 4 characters.
5. Write a Python program using function to count the number
of words starting with the vowel in a file Books.txt
6. 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”.
7. Write an interactive menu driven 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.
8. 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.
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 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.
11. 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.
12. 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.
13. Write an interactive Python program to do the following using
functions :
(i) Accept a list of elements and exchange the first half with the
second half of the list.
(ii) Accept a list of strings and display the number of palindrome
words present in it.
14. 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.
TABLE : PAYLEVEL
17. Consider the following tables SPORTS and COACH and answer
the questions that follows:
TABLE : SPORTS
Scode Sportsname Participants Prizemoney Scheduledate
101 Carrom 2 5000 2012-01-23
102 Badminton 2 12000 2011-12-12
103 Table Tennis 4 8000 2012-02-14
105 Chess 2 9000 2012-01-01
108 Lawn Tennis 4 25000 2012-03-19
TABLE : COACH
Table : Celebrity