Class 12 Term 2 Sample Paper Computer Science Set 3

Class 12 Term 2 Sample Paper Computer Science Set 3

Subject: Computer Science

Subject Code: 083

Class : 12

Maximum Marks: 35 Time: 2 hours

General Instructions

The question paper is divided into 3 sections – A, B and C

● Section A, consists of 8 questions (1-7). Each question carries 2 marks.

● Section B, consists of 4 questions (8-10). Each question carries 3 marks.

● Section C, consists of 3 questions( 11-13). Each question carries 4 marks.

● Internal choices have been given for question numbers – 7,8,12

SECTION-A

(Each question carries 2 marks)

1. Show the Stack’s status after each of the following operations. Show position of top by underlining the element.Stack ‘s’ is initially empty.

i) s.push(10)

ii) s.push(20)

iii) s.pop()

iv) s.push(15)

v) s.push(20)

 

2. (i) Expand the following:

NIC, ARPANET

(ii) Which of the following is omnidirectional?

Infrared, Microwave, Radio wave

 

3. Differentiate between order by and group by with example.

 

4. The ‘STUDENT’ table is stored in the database ‘SCHOOL’ in MySQL. The database credentials include host as ‘localhost’, user as ‘root’ and password as ‘cloud’. Write python script to do the following:

● Import necessary modules to establish MySQL connectivity with Python

● Write a statement to establish connection to the database using given credentials.

 

5. Consider the following table ITEM

PRICENAME
20BOOK
4PENCIL
15PEN
5ERASER
30PEN

Write the output for the following queries :

a)Select SUM(PRICE) from ITEM where Name LIKE ‘P%’;

b)Select * from ITEM wherePRICE IN ( 4,20);

c)Select COUNT(DISTINCT NAME) FROM ITEM;

d)Select MAX(PRICE) as HIGHEST PRICE FROM ITEM; 

 

6. (i) Which command is used to open a database? 

(ii) Which keyword is used to eliminate duplicate values in a column while displaying?

 

7. Consider the following table Student.

SUBJECTMARK
CS25
MATHS30
PHYSICS25
ENGLISH36
CHEMISTRY29

 

a)Write Cardinality and degree of the above table.

b)Insert a new row to the table Student.

OR

a)Update the mark of ENGLISH as 30 using SQL Command.

b)Write SQL command to display details like data types,name of column,constraints etc. of a table.

SECTION -B

Each question carries 3 marks
8. Mr.Ajay has created a list of elements. Help him to write a program in python with functions, PushEl(element) and PopEl(element) to add a new element and delete an element from a List of element Description, considering them to act as push and pop operations of the Stack data structure . Push the element into the stack only when the element is divisible by 4.

For eg:if L=[2,5,6,8,24,32]
then stack content will be 32 24 8

OR

Ms.Suparna has created a dictionary containing employee IDs and salaries as key value pairs of 10 employees. Write a program to perform the following operations using separate user defined functions.
● Push the keys (IDs) of the dictionary into the stack, if the corresponding salary is >30000.
● Pop and display the content of the stack
For eg:if D={1101:34000,1201:23000,1190:40000}
Then output will be 1190 1101 3

9. (i) Consider the following tables.

Table: Order

OrderIdOrderDateSalesPersonOrderAmount
1012015/01/10R.K.1100
1022015/04/01R.S.2100
1032015/06/03R.K.3000
1042015/07/09M.S.2000
1052015/12/10R.S1200

Table:SalesPesron

SIDOrderIdArea
S0010O101TVM
S0010O103KLM
S0014O104PKD

 

a)Suggest the foreign key for the table SalesPerson.

b)Name the data types of the columns OrderDate and OrderAmount .

 

(ii) Differentiate between having and where clause. 

10. Mr.Sandeep is working as Database Administrator .He designs the following database table to store the information on candidates who register for examination.

Table:Candidates

Field NameData TypeRemarks
CNOChar(8)Candidate Number
CNAMEvarchar(30)Name of candidate
DOBDateDate of Birth of Candidate

 

i) Help him to identify the primary key of the table.

ii) Write SQL command to create the above table. Also mention the advantage of using varchar data type over char data type for storing names.

SECTION C

Each question carries 4 marks
11. Study the following tables DOCTOR and SALARY and write SQL commands for the questions (a) to (d)

Table: DOCTOR

IDNAMEDEPTSEXEXPERIENCE
109MehulMEDICINEF9
105JonsonORTHOPEDICM10
117LucyENTF3
111BeconMEDICINEF10
130MorphyORTHOPEDICM15

 

TABLE:SALARY

IDBASICALLOWANCECONSULTATION
101120001000300
104230002300500
107320004000500
114120005200100
109420001700200

 

(a) Display NAME of all doctors who are in “MEDICINE” and having more than 10 years experience from table DOCTOR.

(b) Display the average salary of all doctors working in “ENT” department using the tables DOCTOR and SALARY. Salary=BASIC+ALLOWANCE.

(c) To display total number of lady doctors.

(d) To display department wise maximum year of experience.

12 (i) Write the function of following devices : a)Modem b)Switch

OR

How is XML differ from HTML? 

(ii) Compare LAN,MAN,WAN

 

13. The NEW INDIA Organization has set up its new Branch at Mizoram for its office and web based activities .It has 4 wings to building as shown in the diagram.

Center to center distance between various blocks

Wing  X To  Wing   Z40 m
Wing  Z To  Wing   Y60 m
Wing  Y To  Wing   X135 m
Wing  Y To  Wing   U110 m
Wing  X To  Wing   U165 m
Wing  Z To  Wing   U90 m

Number of computers

 Wing   X50
Wing   Z130
Wing   Y40
Wing   U15

(i) Suggest a suitable layout of connection between the wings and topology.

(ii) Suggest a suitable place (i.e. wing) to house the server of this organization with a suitable reason with justification.

(iii) Suggest the placement of the following devices with justification. (a)Repeater (b) Hub/Switch

(iv) Suggest the most suitable wired medium for efficiently connecting each computer installed in every building out of the following network cables.

• Co-axial cable

• Ethernet cable

• Single pair telephone cable

 

Source:KVS RO ERNAKULAM

Copywrite © 2020-2025, CBSE Python,
All Rights Reserved