CS PRACTICAL (1)
CS PRACTICAL (1)
CLASS - XII
COMPUTER SCIENCE (083)
SET A
M.M.: 30
Q1. Write a program to read data from data file in append mode and use
writeLines function utility in python.
(4)
Q2. Write a function in Python POP(Arr), where Arr is a stack implemented by
a list of numbers. The function returns the value deleted from the stack.
(4)
Q3. Write SQL commands for the following queries (i) to (iv) based on the
relation TRAINER and COURSE given below:
(4)
TABLE: TRAINER
TID TNAME CITY HIREDATE SALARY
101 SUNAINA MUMBAI 1998.10.15 90000
102 ANAMIKA DELHI 1994.12.24 80000
103 DEEPTI CHANDIGARH 2001.12.21 82000
104 MEENAKSHI DELHI 2002.12.25 78000
105 RICHA MUMBAI 1996.01.12 95000
106 MANIPRABHA CHENNAI 2001.12.12 69000
TABLE: COURSE
CID CNAME FEES STARTDA TID
TE
C201 AGDCA 12000 2018.07.0 101
2
C202 ADCA 15000 2018.07.1 103
5
C203 DCA 10000 2018.10.0 102
1
C204 DDTP 9000 2018.09.1 104
5
C205 DHN 20000 2018.08.0 101
1
C206 O LEVEL 18000 2018.07.2 105
5
(i) Display the Trainer Name, City & Salary in descending order of their
Hiredate.
(ii) To display the Tname and City of Trainer who joined the institute in
the month of December 2001.
(iii) To display TNAME, HIREDATE, CNAME, STARTDATE from tables
TRAINER and COURSE of all those courses whose FEES is less than
or equal to 10000.
(iv) Find the total salary scored by each Trainer.
Project file (7)
Project (8)
Viva (3)
TABLE: ADMIN
CODE GENDER DESIGNATION
1001 MALE VICE PRINCIPAL
1009 FEMALE COORDINATOR
1203 FEMALE COORDINATOR
1045 MALE HOD
1123 MALE SENIOR TEACHER
1167 MALE SENIOR TEACHER
1215 MALE HOD
(i) To decrease period by 10% of the teachers of English subject.
(ii) To display TEACHERNAME, CODE and DESIGNATION from tables
SCHOOL and ADMIN whose gender is male.
(iii) To display number of teachers in each subject.
(iv) Retrieve all Teachers from the SCHOOL table, along with their
DESIGNATION. If a TEACHER has no DESIGNATION, show NULL.
Project file (7)
Project (8)
Viva (3)