Term 2 Sample Paper Class 12 Computer Science (083)

Set-1

Max. Marks: 35

Duration: 2:00 Hrs

General Instructions:

1. This question paper contains two parts A and B. Each part is compulsory.

2. Part-A has 8 MCQ questions of 1 mark each, Attempts any 5 questions.

3. Part – B has three sections

Section-I is short answer questions of 2 marks each.

Section-II is long answer questions of 3 marks each.

Section-III is very long answer questions of 4 marks.

4. All programming questions are to be answered using Python Language only.

 

PART – A

Q. Select the most appropriate option out of the options given for each question. Attempt any 5 questions from no 1 to 8.

 

1. If a user tries to remove an element from empty Stack, it is called-

a) Empty Collection

b)Overflow

c)Underflow

d)Garbage Collection

 

Ans:c)Underflow

 

 

2. Which of the following is application of Stack?

a)One Way Traffic

b)A line of ticket seeking people

c)Reversing the order of items

d)Printer shared among four computers

 

Ans:c)Reversing the order of items

 

3. Consider the following operation performed on a stack of size 5.

Push(1); Pop();Push(2);Push(3); Pop(); Push(4);Pop();Pop();Push(5);

After the completion of all operation, the number of elements present in stack are:

a)1

b)2

c)3

d)4

 

Ans: d)4

 

4. Network in which every computer is capable of playing the role of a client, or a server or both at same time is called-

a)local area network

b)peer-to-peer network

c)dedicated server network

d)wide area network

 

Ans:b)peer-to-peer network

 

5. In computer, converting a digital signal in to an analog signal is called-

a)modulation

b)demodulation

c)conversion

d)transformation

 

Ans:a)modulation

 

6. Which of the following keywords will you use in the following query to display the unique values of the column dept_name?

a)all

b)from

c)distinct

d)unique

 

Ans:c)distinct

 

 

7. The pattern ‘_ _ _’ matches any string of _______ three characters. ‘_ _ _%’ matches and string of _________ three characters.

a)Atleast, Exactly

b)Exactly, Atleast

c)Atleast, All

d)All, Exactly

 

Ans: b)Exactly, Atleast

 

8. All aggregate functions except____________ ignore null values in their input collection.

a)count(attribute)

b)count(*)

c)avg

d)none of these

 

Ans: b)count(*)

 

 

Part B (SECTION – I)

9. Expand the following-

i) SMTP

ii) DHCP

iii) HTTP

iv) TCP

 

Ans: 

i) SMTP : Simple Mail Transfer Protocol

ii) DHCP: Dynamic Host Configuration Protocol

iii) HTTP:Hypertext Transfer Protocol

iv) TCP: Transmission Control Protocol

 

10. Define Web-Hosting?

Ans:  Web hosting is the process of renting or buying space to house a website on the World Wide Web.

OR

 

Give difference between Video Conferencing and Chat.

Ans: Chatting is textual conversation between 2 or more members over the internet. Video conferencing is a real time video conversation over the internet.

 

 

11. Give difference between CHAR and VARCHAR. Give Example.

Ans:

The basic difference between Char and Varchar is that:

char stores only fixed-length character string data types whereas varchar stores variable-length string where an upper limit of length is specified.

 

12. What do you understand by the terms Candidate Key? What is Cardinality?

Ans: Candidate Key: A candidate key is the one that is capable of becoming primary key. i.e., a field or attribute that has unique value for each row in the relation.

Cardinality: It refers to the total number of tuple in the table.

 

13. The SQL SELECT provides clauses for sorting data and for grouping results. Write the names of clauses for these.

Ans: The ORDER BY clause of SQL SELECT statement allows to sort the data of result set. The GROUP BY clause of SQL SELECT statement allows to create summarized results of grouped result data from table.

 

 

 

Part-B (SECTION – II)

14. Each node of a Stack contains the following information: PINCODE and NAME of city.

Write a PUSHCITY() function to implement push on stack like operation to add a node to Stack. 

OR

Write a POPCITY() function to implement pop from stack like operation to remove a node(same as above) from Stack.

 

15. A department is considering to maintain their worker data using SQL to stroe the data. As a Database Administrator, Karan has decided that:

Name of the database –Department

Name of the table –Worker

The attributes of Workeer are as follows:

WORKER_ID – CHARACTER OF SIZE 3

FIRST_NAME – CHARACTER OF SIZE 10

LAST_NAME – CHARACTER OF SIZE 10

SALARY – NUMERIC

JOINING_DATE – DATE

 

WORKER_ID FIRST_NAME LAST_NAME SALARY JOINING_DATE DEPARTMENT
001 MONIKA ARORA 100000 2014-02-20 HR
002 NIHARIKA DIWAN 80000 2014-06-11 Admin
003 VISHAL SINGHAL 300000 2014-02-20 HR
004 AMITABH SINGH 500000 2014-02-20 Admin
005 VIVEK BHATI 500000 2014-06-11 Admin
006 VIPUL DIWAN 200000 2014-06-11 Account
007 SATISH KUMAR 75000 2014-02-20 Account
008 MONIKA CHAUHAN 80000 2014-04-11 Admin

 

Attempt any 3 of the following-

i) Karan wants to remove all the data from table WORKER from the database department. Which command will he use from the following:

a) DELETE FROM WORKER;

b) DROP TABLE WORKER;

c) DROP DATABASE Department;

d) DELETE * FROM WORKER;

 

ii) Identify the attribute best suitable to be declared as a primary key.

 

iii) Karan wants to increase the size of the FIRST_NAME column from 10 to 20 characters. Write an appropriate query to change the size.

 

iv) Write a query to display the structure of the table Worker, i.e. name of the attribute and their respective data types.

 

16.  Write the output of the SQL queries (i) to (iii) based on the table: Employee

Table: Employee

ECODE NAME DEPT DOB GENDER DESIGNATION SALARY
101 SUNITA SALES 06-06-1995 F MANAGER 25000
102 NEERU OFFICE 05-07-1993 F CLERK 12000
103 RAJU PURCHASE 05-06-1994 M MANAGER 26000
104 NEHA OFFICE 08-08-1995 F ACCOUNTANT 18000
105 NISHANT OFFICE 08-10-1995 M CLERK 10000
106 VINOD OFFICE 12-12-1994 M CLERK 10000

 

i) SELECT SUM(SALARY) FROM EMPLOYEE WHERE GENDER=’F’ AND DEPT =’SALES’;

ii) SELECT MAX(DOB), MIN(DOB) FROM EMPLOYEE;

iii) SELECT GENDER, COUNT(*) FROM EMPLOYEE GROUP BY GENDER;

 

17. Consider the table TEACHER given below. Write commands in SQL for (i) to (iii)

Table: TEACHER

ID NAME DEPARTMENT HIREDATE CATEGORY GENDER SALARY
1 TANIYA SOCIAL STUDIES 1994-03-17 TGT F 25000
2 ABHISHEK ART 1990-12-02 PRT M 20000
3 SANJANA ENGLISH 1980-05-16 PGT F 30000
4 VISHWAJEET ENGLISH 1989-10-16 TGT M 25000
5 AMAN HINDI 1990-01-08 PRT F 22000
6 PRITAM MATH 1980-03-17 PRT F 21000
7 RAJKUMAR SCIENCE 1994-02-09 TGT M 27000
8 SHEETAL MATH 1980-11-17 TGT F 24500

 

Attempt the following –

i) To display all information about teachers of Female PGT Teachers.

ii) To list names, departments and date of hiring of all the teachers in descending order of date of joining.

iii) To count the number of teachers and sum of their salary department wise.

 

Part B (SECTION – III)

18. Success Institution is an educational organisation. It is planning to set up its India campus at Nepal with its head office at Mumbai. The Nepal campus has 4 main buildings- ADMIN, ENGINEERING, BUSINESS and MEDIA.

You as a network expert have to suggest the best network related solutions for their problems raised in (i) to (iv), keeping in mind the distance between the buildings and other given parameters.

Shortest distance between various buildings.

Buildings Distance
ADMIN to ENGINEERING 50 M
ADMIN to BUSINESS 80 M
ADMIN to MEDIA  45 M
ENGINEERING to BUSINESS  60 M
ENGINEERING to MEDIA  145 M
BUSINESS to MEDIA  50 M
Mumbai Head Office To Nepal Campus  2175 KM

 

Number of Computers installed at various buildings are as follows:

Building No. of Computers installed
ADMIN 20
ENGINEERING 150
BUSINESS 35
MUMBAI HEAD OFFICE 5

 

i) Suggest the most appropriate location of the server inside the Nepal Campus(out of 4 buildings), to get the best connectivity for maximum number of computers. Justify your answer.

ii) Suggest and draw the cable layout to efficiently connect various buildings within the Nepal Campus for connecting the computers.

iii) Which hardware device will you suggest to be procured by the company to be installed to protect and control the Internet uses within the campus.

iv) Which of the following will you suggest to establish the online face-to-face communication between the people in the ADMIN office of Nepal Campus and Mumbai Head Office?

a)Cable TV

b)E-Mail

c)Video Conferencing

d) Text Chat

 

19. Consider the tables Watches and Sale given below and answer the following questions.

Table: Watches

Watchid Watch_Name Price Type Qty_Store
W001 High Time 10000 Unisex 100
W002 Life Time 15000 Ladies 150
W003 Wave 20000 Gents 200
W004 High Fashion 7000 Unisex 250
W005 Golden Time 25000 Gents 100

Table: Sale

Watchid Qty_Sold Quarter
W001 10 1
W003 5 1
W002 20 2
W003 10 2
W001 15 3
W002 20 3
W005 10 4
W003 15 4

 

Write the SQL command for the following statements:

i) To display total quantity in store of unisex type watches.

ii) To display watch name and their quantity sold in first quarter.

 

Give the output for the following SQL queries:

i) SELECT WATCH_NAME, PRICE , TYPE FROM WATCHES W, SALE S WHERE W.WATCHID=S.WATCHID;

ii) SELECT WATCH_NAME, QTY_STORE , SUM(QTY_SOLD), FROM WATCHES W, SALE S WHERE W.WATCHID = S.WATCHID GROUP BY S.WATCHID

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