List of Programs For Class XII FOR 2022 - 2023
List of Programs For Class XII FOR 2022 - 2023
I] Bubble Sort
II] Insertion Sort
Cycle III :
13. Read a text file line by line and display each word separated by a #.
14. Read a text file and display the number of vowels / Consonants/ Uppercase / Lowercase
characters in the file.
15. Create a binary file with name and roll number. Search for a given roll number and display
the name, if not found display appropriate message.
16. Create a binary file with roll number, name and marks. Input a roll number and update
the marks.
17. Remove all the lines that contain the character `a' in a file and write it to another file.
18. Write a Python program to get student data( roll no, name, and marks) from user and
write onto a binary file. The Program should able to get data from the user and write onto
the file as long as the user wants.
19. A data file contains name and telephone number as two of its fields. Write a Python
program using an object to do the following :
a. Add records in the file.
b. Searching of a telephone numbers for a given name.
c. Determine the name if telephone number is known.
d. Updating the data file, whenever there is a change in telephone number.
e. A menu to implement above mentioned tasks.
20. A file “ Employee.Dat” containing EMPNo (Employee Number), WRATE( Hourly wage rate),
NOH( No of hours worked) fields.
Write a function in PYTHON to do the following :
a. Create a data file of 5 records.
b. Read each record, compute weekly wage as
WRATE * NOH and
Display EMPNO, NOH,WRATE * NOH .
[ Term – II ]
Cycle IV :
1. Write SQL Commands for (i) to (vii) on the basis of table STUDENT
Table : Student
Student No. Class Name Game Grade SUPW Grade
10 7 Sameer Cricket B Photography A
11 8 Suji Tennis A Gardening C
12 7 Kamal Swimming B Photography B
13 7 Veena Tennis C Cooking A
14 9 Archna Basket Ball A Literature A
15 10 Arpit Cricket A Gardening C
i) Display the names of the students who are getting a grade ‘C’ in either Game or SUPW.
ii) Display the number of students getting grade ‘A’ in Cricket.
iii) Display the different games offered in the school.
iv) Diplay the SUPW taken up by the students, whose name starts with ‘A’.
v) Add a new column named ‘Marks’.
vi) Assign a value 200 for Marks for all those who are getting grade ‘B’ or above in GAME.
vii) Arrange the whole table in the alphabetical order to SUPW.
2. Write SQL commands for (i) to (iv) on the basis of table SPORTS.
Table : SPORT
Student No. Class Name GAME1 Grade1 GAME2 Grade2
10 7 Sameer Cricket B Swimming A
11 8 Suji Tennis A Skating C
12 7 Kamal Swimming B Football B
13 7 Veena Tennis C Tennis A
14 9 Archna Basket Ball A Cricket A
15 10 Arpit Cricket A Athelets C
i] Display the names of the students who have grade ‘C’ in either GAME1 or GAME2 or both.
ii] Display the number of students getting Grade ‘A’ in Cricket.
iii] Display the name of the students who have same game for both GAME1 and GAME2.
iv] Display the games taken up by the students, whose name starts with ‘A’.
3. Write SQL/MySql commands for (i) to (vi) and write the output for (vii) on the basis
of table STUDENT.
Table : STUDENT
No. Name Stipend Stream AvgMark Grade Class
1 Kran 400.00 Medical 78.5 B 12B
2 Divakar 450.00 Commerce 89.2 A 11C
3 Divya 300.00 Commerce 68.6 C 12C
4 Arun 350.00 Humanities 73.1 B 12C
5 Sabina 500.00 Non - medical 90.6 A 11A
6 John 400.00 Medical 75.4 B 12B
7 Robert 250.00 Humanities 64.4 C 11A
8 Rubina 450.00 Non – medical 88.5 A 12A
9 Vikas 500.00 Non – medical 92.0 A 12A
10 Mohan 300.00 Commerce 67.5 C 12C