Prac Qus CS

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

SET-A

AISSCE PRACTICAL EXAMINATION 2023-24


SCHOOL CODE: 55191 TOTAL MARKS: 30
SUBJECT & CODE :COMPUTER SCIENCE (083) DURATION : 3 Hrs
_____________________________________________________________________________________________________

LAB TEST :
1. Create a menu driven program in Python using Pickle library and 8
• Create a binary file with following structure
 Employee name
 Employee no
• Display the contents of the binary file.

2. Consider the following tables FACULTY and COURSES. Write SQL commands for the 4
statements (i) to (iv)

(i)To display details of all Trains which Start from New Delhi.
(ii)To display the PNR, PNAME, GENDER and AGE of all Passengers whose AGE is below 50.
(iii)To display total number of MALE and FEMALE Passengers.
(iv)To display details of all Passengers travelling in Trains whose TNO is 12015.

Marks Scored Max Marks


Python Program 8
SQL Queries 4
Report File 7
Project 8
Viva Voce 3
Total 30
Internal Examiner External Examiner

Name : ______________________ Name : ______________________

Sign : ______________________ Sign : ______________________

Examiner no. :________________ Examiner no. :________________


SET-B

AISSCE PRACTICAL EXAMINATION 2023-24


SCHOOL CODE: 55191 TOTAL MARKS: 30
SUBJECT & CODE :COMPUTER SCIENCE (083) DURATION : 3 Hrs
_____________________________________________________________________________________________________

LAB TEST :
1. Create a Python based Stack Program on implementation of stack using list data structure. 8
 Push a stack
 Pop a stack
 Display a stack
2. Consider the following tables FACULTY and COURSES. Write SQL commands for the 4
statements (i) to (iv)
FACULTY
F_ID Fname Lname Hire date Salary
102 Amit Mishra 12-10-1998 12000
103 Nitin Vyas 24-12-1994 8000
104 Rakshit Soni 18-5-2001 14000
105 Rashmi Malhotra 11-9-2004 11000
106 Sulekha Srivastava 5-6-2006 10000
COURSES
C_ID F_ID Cname Fees
C21 102 Grid Computing 40000
C22 106 System Design 16000
C23 104 Computer Security 8000
C24 106 Human Biology 15000
C25 102 Computer Network 20000
C26 105 Visual Basic 6000
(i) To display details of those Faculties whose salary is greater than 12000.
(ii) To display the details of courses whose fees is in the range of 15000 to 50000 (both values
included).
(iii) To increase the fees of all courses by 500 of “System Design” Course.
(iv) To display details of those courses which are taught by ‘Sulekha’ in descending order of
courses.

Marks Scored Max Marks


Python Program 8
SQL Queries 4
Report File 7
Project 8
Viva Voce 3
Total 30
Internal Examiner External Examiner

Name : ______________________ Name : ______________________

Sign : ______________________ Sign : ______________________

Examiner no. :________________ Examiner no. :________________


Consider the following tables STOCK and DEALERS and answer (a) and (b) parts of this question:

(a)Write SQL commands for the following statements:

1. To display the details of all Items in the STOCK table in ascending order of StockDate.
2. To display ItemNo and Item name of those items from STOCK table whose UnitPrice is more than
Rupees 10.
3. To display the details of those items whose dealer code (Dcode) is 102 or quantity in STOCK (Qty)
is more than 100 from the table Stock.
4. To display maximum UnitPrice of items for each dealer individually as per Dcode from the table
STOCK.

Answer:

(a)

1. SELECT*FROM STOCK ORDER BY StockDate;


2. SELECT Item No, Item FROM STOCK WHERE UnitPrice >10;
3. SELECT *FROM STOCK WHERE DECODE 102 OR Qty >100 ;
4. SELECT MAX (Unitprice) FROM STOCK ;
2. Write SQL queries for (a) to (f) and write the outputs for the SQL queries mentioned shown in (gl) to
(g4) parts on the basis of tables PRODUCTS and SUPPLIERS

1. To display the details of all the products in ascending order of product names (i.e., PNAME).
2. To display the price, product name and quantity (i.e., qty) of those products which have quantity
more thhn 100.
3. To display the names of those suppliers, who are either from DELHI or from CHENNAI.
4. To display the name of the companies and the name of the products in descending order of
company names.

Answer:

1. SELECT * FROM PRODUCTS ORDER BY PNAME ASC;


2. SELECT PRICE, PNAME, QTY FROM PRODUCTS WHERE (QTY > 100);
3. SELECT SNAME FROM SUPPLIERS WHERE ((CITY = “DELHI”) OR (CITY = “CHENNAI”));
4. SELECT COMPANY, PNAME FROM PRO-DUCTS ORDER BY COMPANY DESC;

You might also like