Term 2 Sample Paper Class 12 Computer Science (083)

Last updated on May 27th, 2022 at 10:32 pm

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_IDFIRST_NAMELAST_NAMESALARYJOINING_DATEDEPARTMENT
001MONIKAARORA1000002014-02-20HR
002NIHARIKADIWAN800002014-06-11Admin
003VISHALSINGHAL3000002014-02-20HR
004AMITABHSINGH5000002014-02-20Admin
005VIVEKBHATI5000002014-06-11Admin
006VIPULDIWAN2000002014-06-11Account
007SATISHKUMAR750002014-02-20Account
008MONIKACHAUHAN800002014-04-11Admin

 

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

ECODENAMEDEPTDOBGENDERDESIGNATIONSALARY
101SUNITASALES06-06-1995FMANAGER25000
102NEERUOFFICE05-07-1993FCLERK12000
103RAJUPURCHASE05-06-1994MMANAGER26000
104NEHAOFFICE08-08-1995FACCOUNTANT18000
105NISHANTOFFICE08-10-1995MCLERK10000
106VINODOFFICE12-12-1994MCLERK10000

 

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

IDNAMEDEPARTMENTHIREDATECATEGORYGENDERSALARY
1TANIYASOCIAL STUDIES1994-03-17TGTF25000
2ABHISHEKART1990-12-02PRTM20000
3SANJANAENGLISH1980-05-16PGTF30000
4VISHWAJEETENGLISH1989-10-16TGTM25000
5AMANHINDI1990-01-08PRTF22000
6PRITAMMATH1980-03-17PRTF21000
7RAJKUMARSCIENCE1994-02-09TGTM27000
8SHEETALMATH1980-11-17TGTF24500

 

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.

BuildingsDistance
ADMIN to ENGINEERING50 M
ADMIN to BUSINESS80 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:

BuildingNo. of Computers installed
ADMIN20
ENGINEERING150
BUSINESS35
MUMBAI HEAD OFFICE5

 

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

WatchidWatch_NamePriceTypeQty_Store
W001High Time10000Unisex100
W002Life Time15000Ladies150
W003Wave20000Gents200
W004High Fashion7000Unisex250
W005Golden Time25000Gents100

Table: Sale

WatchidQty_SoldQuarter
W001101
W00351
W002202
W003102
W001153
W002203
W005104
W003154

 

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-2025, CBSE Python,
All Rights Reserved