0% found this document useful (0 votes)
69 views3 pages

AISSCE Practical File Work 2023-24

The document provides 20 questions for a Computer Science practical exam, asking students to write Python functions to perform various tasks like counting elements in lists/files, manipulating data structures like stacks and dictionaries, connecting to databases to perform CRUD operations, and writing SQL queries to create tables and manipulate data. Students are instructed to write code for all questions in their practical file and submit it by a specified deadline.

Uploaded by

Anubhav Ray
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views3 pages

AISSCE Practical File Work 2023-24

The document provides 20 questions for a Computer Science practical exam, asking students to write Python functions to perform various tasks like counting elements in lists/files, manipulating data structures like stacks and dictionaries, connecting to databases to perform CRUD operations, and writing SQL queries to create tables and manipulate data. Students are instructed to write code for all questions in their practical file and submit it by a specified deadline.

Uploaded by

Anubhav Ray
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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

Function should display


Total Names beginning from ‘S’ are 2
i. Write a user defined function CreateFile() to input data for 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”

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]

Q15. Write a program to create a function PrintDiagonal(MATRIX), where MATRIX is a list


storing 3 list inside it with each list contains 3 items and print only diagonal elements and also
print sum of diagonal elements.
For e.g. is the MATRIX element is [[10,20,30],[40,50,60],[70,80,90]]
Output should be :
Diagonal Elements 10 50 90
Sum of Diagonal Elements : 150

Q16. Write a menu driven program to show PUSH, POP and Display stack elements.

Q17. Write a program to create a function DictPUSH(SItem) where, SItem is a dictionary


containing the details of stationary items – {Sname:Price}.
The function should push the names of those items in the stack who have price greater than 75.
Also display the count of elements pushed into the stack.
For e.g.
If the dictionary contains the following data :
Ditem={ 'Pen ':106, 'Pencil:59,'Notebook ':80, 'Eraser ':25}
The stack should contain
Notebook
Pen
The output should be :
The count of elements in the stack is 2

Q18. Program to connect with database and insert record [Id,EName,Age,Department] of 6


employees and display them record wise.

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

RollNo Student_Name Stream Marks


101 JAY Science 87
102 AMAN Commerce 73
103 JITESH Commerce 76
104 SANDIP Science 94
105 SEEMA Science 37
106 SNEHA Commerce 80
107 PALLABI Humanities 87
108 SONIA Humanities 65

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.

N.B. Complete the entire assignment.


Continue remaining questions after Half Yearly Exam who have already signed.
Proper indexing is compulsory.
All the above programs and outputs should be written thorough pen in your practical
copy (Use Thread Practical File) and submit it on or before 23rd November 2023.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy