Computer Practical Programs 2024-25
Computer Practical Programs 2024-25
1. Write a menu driven program using functions to perform bubble sort and insertion
sort.
2. Write a menu driven program using functions to perform i)Linear search ii)Binary
Search
4. Write a program to accept a dictionary D and then display the elements in opposite
mapping.
6. Write a program generating a random number between 1-6 simulating a dice roll.
8. Write a menu driven program (using functions) to i) Write the given below text to a file
known as "Fruits.txt" "Neither apple nor pine are in pineapple. Boxing rings are square.
Writers write, but fingers don't fing. Overlook and oversee are opposites. A house can
burn up as it burns down. An alarm goes off by going on." ii) Read the entire contents
from fruits.txt iii) Display the last line of the file fruits.txt iv) Display the words which
are having less than 4 letters v)To count and display the total number of alphabet in
fruits.txt
9. Write a menu driven program(using functions) to i)To write the given below text to a
file known as "India.txt" "India is the fastest growing economy.India is looking for more
investments around the globe. The whole world is looking at India as a great
market.Most of the Indians can foresee the heights that India is capable of reaching.’’ ii)
Replace every occurrence of 'the' with 'these' iii) Display the frequency of each word in
the file. iv) Display the lines starting with 'I' or 'T' v) Copy the contents of India.txt to
another file India2.txt
10. Write a program to write, read, search, modify and delete the contents of a binary file
student.dat(using list or dictionary)
11. Write a program to write ,read,search ,modify the contents of a csv file
'employee.csv(using list or dictionary)
12. Write a menu driven program to perform push, pop and display a stack – BOOK
(Bookno, Bookname, Authorname are the details)using functions.
13. Write a program to push a line of text into a stack from the input terminal. Display
the string in the reverse order, but each character appearing twice.(Eg:- if the string is a b
c d e, the output should be ee dd cc bb aa)
14.Write a program to check whether a given text is palindrome or not using stack.
Write a menu driven program to connect with database and store record of coaches and
display the records.
17. Consider the table CLUB. Write a menu driven program to connect with the database
and search for coach/coaches based on i) coach_id ii) sports and display records. If
coach/coaches not found , display appropriate message.
18. Consider the table CLUB. Write a program to connect with the database and update
the pay of a particular coach based on coach _id.
19. Consider the table CLUB. Write a menu driven program to connect with the database
and i) delete the details of coaches based on coach_id ii) delete details of coaches whose
names start with “k”.
20. Write the SQL commands for the following on the basis of given table STUD.
TABLE : STUD
(a) Select all the non-medical stream students.
(b) List the names of those students who are in the class 12 sorted by stipend.
(c) List all the students sorted by avgm in descending order.
(d) Display a report, listing name, stipend, stream and amount of stipend received in a
year, assuming that the stipend is paid every month.
(e) Display the total stipend of students belonging to each stream
(f) Increment the stipend of humanities students by 10
(g) Display the maximum stipend given for each stream
Table :Customer
a) Write a SQL query to find the customer and sales person from the same city.
b) Write a query to find those customers who are served by a salesperson and the
salesperson earns commission in the range of 12% to 14%.
c) Write a query to find the names of the sales person which starts with 'P'.
d) Write a query to find the details of the customers from New York.
e) Write a query to find the name of the sales person who gets maximum commission.
************************