Class 12 Term 2 Sample Paper Computer Science Set 6

Maximum Marks: 35/Time: 2 hours

General Instructions

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

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

> Section B, consists of 3 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 and 12.

 

Section ‘A’

(Each question carries 2 marks)

1. What do mean by ‘LIFO’ property of Stack? What is ‘PUSH’ and ‘POP’ in stack?

2. Give full form of – HTTP , FTP

3. (i) Which of the following is privately owned and links the devices in a single office, building or campus?

(LAN, MAN, WAN)

3. (ii) Which topology uses a single cable which connects all the including nodes?

(STAR, BUS, RING)

4. Differentiate between ‘INT’ and ‘FLOAT’ data type with respect to databases?   

5. A resultset is extracted from the database using the cursor object (that has been already created) by giving the following statement.

Mydata=cursor.fetchone()

i) How many records will be returned by fetchone() method?

ii) What will be the datatype of Mydata object after the given command is executed?

6. Write the output of the queries (i) to (iv) based on the table, ‘COURSE’ given below: 

CourseID CourseName CourseFee Discount
M001 MBA 60000 5
B002 BPHARM 66000 2
D003 DPHARM 50000 3
BT04 BTECH 55000 10
MT05 MTECH 45000 10
B006 BED 35000 15
PE07 MPED 28000 5

 

i) SELECT SUM(DISCOUNT) FROM COURSE WHERE COURSEFEE>48000;

ii) SELECT MIN(COURSEFEE) FROM COURSE;

iii) SELECT * FROM COURSE WHERE DISCOUNT>5 AND COURSEID LIKE “B%”;

iv) SELECT COURSENAME, COURSEFEE FROM COURSE WHERE DISCOUNT>9;

 

7. Write command to view- 

i) List of databases

ii) List of tables

 

SECTION – B

Each question carries 3 marks

8. Priyasha has created a dictionary containing brand and price as key value pairs of 6 mobiles. Write a program, with separate user defined functions to perform the following operations: 

i) Push the keys (brand of the mobile) of the dictionary into a stack, where the corresponding value (price) is greater than 15000.

ii) Pop and display the content of the stack. For example:

If the sample content of the dictionary is as follows:

R={“NOKIA”:17600, “VIVO”:8500, “MI”:8900, “SAMSUNG”:16500, “LG”:9600, “MOTO”:18300}

The output from the program should be:

NOKIA SAMSUNG MOTO

OR

Vikas has a list containing 10 integers. You need to help him create a program with separate user defined functions to perform the following operations based on this list. 

i) Traverse the content of the list and push the odd numbers into a stack.

ii) Pop and display the content of the stack.

For Example:

If the sample Content of the list is as follows: N=[12, 13, 34, 56, 21, 79, 98, 22, 35, 38]

Sample Output of the code should be: 23 21 79 35   

 

9. (i) A table, ITEM has been created in a database with the following fields: 

ITEMCODE, ITEMNAME, QTY, PRICE, DISCOUNT

Give the SQL command to remove field, ‘DISCOUNT’ of ‘ITEM’ table.

9. (ii) Categorize following commands into DDL and DML commands.

INSERT INTO, DROP TABLE, ALTER TABLE, UPDATE. SET

 

10. Vaibhav want to create a table with the following specifications. Help him by writing the correct command in SQL. 

Table name : PRODUCTS

ATTRIBUTES Data Type Constraint
PID INTEGER PRIMARY KEY
PNAME VARCHAR(30) NOT NULL
COST FLOAT
DOP DATE
WEIGHT INTEGER DEFAULT 10

 

Section C

Each question carries 4 marks

 

11. Write queries (a) to (d) based on the tables KIDS and CHOCOLATE given below:

Table : KIDS

CODE KIDNAME AGE CHOKOID GRADE
1001 MONU 5 CH621 1
1002 SONU 6 CH765 1
2001 TINU 7 CH356 2
2003 MEENA 7 CH356 2
3005 JAYA 8 CH356 3
3007 RIYA 9 CH765 3

 

Table : CHOCOLATE

CHOKOID NAME PRICE
CH235 PERK 20
CH356 MUNCH 15
CH467 KINDER 30
CH621 KISMI BAR 5
CH765 ECLAIRS 2

 

i) To display total students assigned to each chocolate. (chocolate wise no of students)

ii) To display kidname and chocolate name of each kid whose age is more than 6.

iii) Show the CHOKOID from KIDS table without repetition.

iv) To show the KIDNAME, AGE and GRADE where KIDNAME in alphabetical order.

 

12. (i) Give two advantages and two disadvantages of bus topology.

OR

Define the following terms: Web Browser, Web Server

12. (ii) Explain the following.

a) HTML

b) URL

c) WWW

d) HTTPS     

 

13. BeHappy Corporation has set up its new centre at Noida, Uttar Pradesh for its office and web-based activities. It has 4 blocks of buildings.

 

BeHappy

Distance between the various blocks is as follows:

A to B       40 m

B to C       120m

C to D      100m

A to D      170m

B to D       150m

A to C      70m

 

Numbers of computers in each block:

Block A – 25

Block B – 150

Block C – 125

Block D – 10       

 

i) Suggest and draw the cable layout to efficiently connect various blocks of buildings within the Noida centre for connecting the digital devices. 

ii) Suggest the placement of the following device with justification. 

a) Repeater

b) Hub/Switch

iii) Which kind of network (PAN/LAN/WAN) will be formed if the Noida office is connected to its head office in Mumbai?

iv) Which fast and very effective wireless transmission medium should preferably be used to connect the head office at Mumbai with the centre at Noida?

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