You are on page 1of 1

CLASS XII-CD TERM 2 FINAL EXAMINATION 2021-22

COMPUTER SCIENCE PRACTICAL EXAMINATION


RE TEST
Total Time: 60 Minutes Maximum Marks: 15
Python:
Process a STACK implementation of a Python List containing Python Tuples, storing names of
Countries along with their Capitals like the example given below:
STACK=[('Pakistan','Islamabad'),('Nepal','Kathmandu'),('India','New Delhi')]
Write a menu based Python programs to define and execute the following user defined functions:
a. A function PUSH() to add one more Tuple into the STACK (at the index number 0 of the List).
Input the details (Country and Capital) from the user.
b. A function POP() to remove one Tuple from the STACK (the List of Tuples).
c. A function DISPLAY() to display the STACK (the List of Tuples).
Time: 15 Minutes
Marks: 2
MySQL:
Consider the Database SCHOOL and the 2 Tables TEACHERS and SUBJECTS:
Database: SCHOOL
Table: TEACHER Teacher: SUBJECTS
TID TNAME SEX SUBC DOB SUBC SUBJECT
T01 Aaradhya F 042 1974-12-30 041 Mathematics
T05 Aras M 041 1978-10-17 042 Physics
T06 Arav M 083 1972-01-31 043 Chemistry
T08 Arati F 041 1991-04-04 083 Comp. Sc.
T10 Aryabhatta M 043 1993-11-21
Write MySQL commands/queries to do the following:
a. Create the above Database & 2 Tables.
b. Insert all the rows as seen with the above 2 Tables.
c. Display details of all the teachers in ascending order of their SUBJECT. In case of same SUBJECT,
details will be displayed in ascending order of their TNAME.
d. Display names of all teachers with their subjects in descending order of their DOB.
e. Display the number of teachers in each gender (SEX) category of the teachers.
f. Find the output of the query: SELECT MIN(TNAME) FROM TEACHER;
g. Find the output of the query: SELECT * FROM TEACHER WHERE TNAME LIKE 'Ara_';
Time: 30 Minutes
Marks: 4
Uploading Time: 15 Minutes
Students are required to upload the following files/documents by 12:00 Noon.
1. A single pdf file containing the following:
 Python Program – source code
 Output of the Python program - screenshots
 Tables with respective tuples – screenshots of DESCRIBE & SELECT *
 SQL commands of the queries along with outputs - screenshots
 Outputs of the SQL queries along with the queries - screenshots
2. pdf copy of the Program Report File
3. pdf copy of the Project Report File
All 3 pdf file names MUST contain student’s name and class.

Viva Voce:
Viva syllabus includes all Python, MySQL & Python-MySQL connectivity topics of the Term 2 syllabus of Class XII

You might also like