0% found this document useful (0 votes)
46 views4 pages

Xii CS - Practical List

Uploaded by

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

Xii CS - Practical List

Uploaded by

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

PRACTICAL LIST OF CLASS XII COMPUTER SCIENCE

TERM-2
1) Write a Python program to implement a stack using list (PUSH & POP
Operation on Stack).
2) Write a python program using function PUSH(Arr), where Arr is a list of
numbers. From this list push all numbers divisible by 5 into a stack
implemented by using a list. Display the stack if it has at least one
element, otherwise display appropriate error message.
3) Write a python program using function POP(Arr), where Arr is a stack
implemented by a list of numbers. The function returns the value deleted
from the stack.

4) Write the SQL Queries of the TEACHERS Table1.


Table :Teacher

NO NAME AGE DEPARTMENT DOJ SALARY GENDER


1 Jujal 34 Computer 10/01/97 22000 M
2 Sharmila 31 History 24/03/98 30000 F
3 Sandeep 32 Maths 12/12/96 35000 M
4 Rakesh 42 History 01/07/99 30000 M
5 Neelam 33 Maths 25/02/97 21000 F
(i) Write a command to create the Teacher table.
(ii) Write the query to insert the given 5 record in teachers table.
(iii) To show all the information about the teachers of History department.
(iv) To list the names of the female teachers who are in Maths department.
(v) To list the name of the teachers with their date of joining in ascending
order.
(vi) To display the name of the teachers whose name starts with ‘R’ and
end with ‘h’.
(vii) To count number of teachers with age less than 42.

5) Write the SQL Queries of the Following Tables: Product and Client.
Table: PRODUCT

P_ID Product Name Manufacturer Price


TP01 TalcomPowder LAK 40
FW05 Face Wash ABC 45
BS01 Bath Soap ABC 55
SH06 Shampoo XYZ 120
FW12 Face Wash XYZ 95
Table: CLIENT

C_ID Client Name City P_ID


01 TalcomPowder Delhi FW05
06 Face Wash Mumbai BS01
12 Bath Soap Delhi SH06
15 Shampoo Delhi FW12
16 Face Wash Banglore TP01

(i) To display the details of those Clients whose city is Delhi.


(ii) To display the details of Products whose Price is in the range of 50 to
100(Both values included).
(iii) To display the ClientName, City from table Client, and ProductName and
Price from table Product, with their corresponding matching P_ID.
(iv) To increase the Price of all Products by 10
(v) SELECT DISTINCT Address FROM Client.
(vi) SELECT Manufacturer, MAX(Price), Min(Price), Count(*) FROM
Product GROUP BY Manufacturer;
(vii) SELECT ClientName, ManufacturerName FROM Product, Client
WHERE Client.Prod_Id=Product.P_Id;
(viii) SELECT ProductName, Price * 4 FROM Product.

6) Write the SQL Queries of the Following Tables: Doctors and Salary.
TABLE: DOCTOR

ID NAME DEPT SEX EXPERIENCE


101 Johan ENT  M   12
104 Smith ORTHOPEDIC  M   5
107 George CARDIOLOGY  M   10
114 Lara SKIN  F   3
109 K George MEDICINE  F   9
105 Johnson ORTHOPEDIC  M   10
117 Lucy ENT  F   3
111 Bill MEDICINE  F   12
130 Murphy ORTHOPEDIC  M   15

TABLE: SALARY

ID BASIC ALLOWANCE CONSULTAION


101 12000   1000   300
104 23000   2300   500
107 32000   4000   500
114 12000   5200   100
109 42000   1700   200
105 18900   1690   300
130 21700   2600   300

(i) Display NAME of all doctors who are in “MEDICINE” having more than 10
years experience from the Table DOCTOR.
(ii) Display the average salary of all doctors working in “ENT”department
using the tables. DOCTORS and SALARY Salary =BASIC+ALLOWANCE.
(iii) Display the minimum ALLOWANCE of female doctors.
(iv) Display the highest consultation fee among all male doctors.
(v) SELECT count (*) from DOCTOR where SEX = “F”
(vi) SELECT NAME, DEPT , BASIC from DOCTOR, SALRY Where DEPT
= “ENT” AND DOCTOR.ID = SALARY.ID

7) Write the SQL Queries of the Following Tables: Sender and Recipient.

TABLE : SENDER

SenderID SenderName Sender Address Sender City


ND01 R jain 2,ABC Appts New Delhi
MU02 H sinha 12, Newton Mumbai
MU1 5 S haj 27/ A,Park Street New Delhi
ND5 0 T Prasad 122-K,SDA Mumbai

TABLE :RECIPIENT

RecID SenderID ReCName RecAddress ReCCity


KO05 ND01 RBajpayee 5,Central Avenue Kolkata
ND08 MU0 2 S Mahajan 116, A Vihar NewDelhi
MU19 ND01 H sing 2A,Andheri East Mumbai
MU32 MU1 5 PK Swamy B5, CS erminus Mumbai
ND48 ND50 S Tripathi 13, B1 D,Mayur Vihar NewDelhi
(i) To display the names of all senders from Mumbai.
(ii) To display the recID, senderName, senderAddress, RecName, RecAddress
for every recipt.
(iii) To display the sender details in ascending order of SenderName.
(iv) To display number of Recipients from each city.
(v) SELECT DISTINCT SenderCity FROM Sender;
(vi) SELECT A.SenderName A, B.RecName FROM Sender A, Recipient B
WHERE A.SenderID=B. SenderID AND B.RecCity=’Mumbai’;
(vii) SELECT RecName,RecAddress FROM Recipient WHERE RecCity Not
IN (‘Mumbai’,Kolkata’);
(viii) SELECT RecID, RecName FROM Recipient WHERE SenderID = ‘MU02’ OR
SenderID = ‘ND50’;

8) Integrate MySQL with Python by importing the MySQL module and add
records of student and display all the record.
9) ntegrate MySQL with Python by importing the MySQL module to search
student using rollno, name, age, class and if present in table display the
record, if not display appropriate method.
10) Integrate SQL with Python by importing the MySQL module to search a
student using rollno, update the record.
11) Integrate SQL with Python by importing the MySQL module to search a
student using rollno, delete the record.

You might also like