AISSCE Practical File Work 2023-24
AISSCE Practical File Work 2023-24
Class XII
Subject : Computer Science
Q1. Write definition of a method/function HowMany(ID,Val) to count and display number of
times the value of Val is present in the list ID. Execute the function by call it.
For example :
If the ID contains [115,122,137,110,122,113] and Val contains 122. The function should display
122 found 2 Times.
Q2. Write definition of a method ZeroEndingSum(POINTS) to add those values in the list of
POINTS, which are ending with 0 and execute the code by call the function.
Q3. Write a function SwitchOver(VAL ), which accepts a list as arguments to swap the content
with the next value divisible by 7 so that the resultant list looks like:
3, 21, 5, 6, 8, 14, 3, 14,13
3, 5, 21, 6, 8, 3,14, 13,14
Execute the code by call the function.
Q4. Write a function REMOVE(L), which accepts a list as arguments and remove all the
duplicate elements from the same list.
Q5. Write a function DISPLAY() to count and display the number of words begins with upper
case character from a text file ‘poem.txt’;
Q6. Write a function SHOW() to count and display the number of lines ends with vowel from a
text file ‘Notes.txt’;
Q7. Write a function DISP() to count and display the number of digits present in a text file
‘Story.txt’.
Q8. A binary file “Book.dat” has structure [BookNo, Book_Name, Author, Price].
i. Write a user defined function CreateFile() to input N numbers of data for a record and add to
Book.dat .
ii. Write a function CountRec(Author) in Python which accepts the Author name as parameter
and count and return number of books by the given Author are stored in the binary file
“Book.dat”
Q9. Create a binary file ‘emp.dat’ and store the data of id, name and salary in the form of
dictionary.
Input id of an employee and update his/her salary by 10%.
Q10. Write a program to shows the positions of file pointers using seek() and tell().
Q11. Write a random number generator that generates random numbers between 1 and 6
(simulates a dice).
Q12. Write a function SCOUNT() to read the content of binary file ‘NAMES.DAT’ and
display number of records (each name occupies 20 bytes in file) where name
begins from ‘S’ in it.
For. e.g. if the content of file is:
SACHIN
AMIT
AMAN
SUSHIL
DEEPAK
HARI SHANKER
Q13. Program to create a CSV file ‘record.csv’, which stores empno, name, city then search an
empno and display his/her name and city. If not found appropriate message should be
Displayed.
Q14. Write a python function CSVCOPY() to copy the records of those students who have
secured marks 90 or more than 90 into another csv file.
Structure of csv file as follows:
[id,name,class,marks]
Q16. Write a menu driven program to show PUSH, POP and Display stack elements.
Q19. Program to connect with database and search employee number in table employee and
display record, if empno not found display appropriate message.
Q20. Program to connect with database and update the employee record of entered empno.
Q21. Program to connect with database and delete the record of entered employee number.
SQL
Q 22. a. Create a SQL table SCHOOL as following given descriptions and insert the
following data into it.
Name of the database-myschool
• Name of the table-SCHOOL
• The attributes of SCHOOL are as follows:
Roll No–numeric
Student_Name–character of size 20
Stream - character of size 20
Marks–numeric
N.B. : Output should be written after each query.
Table:SCHOOL
b. To display the records from table SCHOOL in alphabetical order of name of the student.
c. To increase Marks of all Commerce students by 10%.
d. Add a column Grade with varchar data type of the above table.
e. To change the size of attribute Stream to 25.
f. To display total number of students in each stream.
g. To display details of the students which name end with ‘A’.
h. To display the maximum marks from each stream.
i. To remove record of RollNo 105.
j. Add grade ‘A’ who are secured 80 or more marks
k. Add a primary key to the field RollNo
l. To remove Stream from table SCHOOL.