In this article, I am going to discuss the Answer key CBSE Computer Science Term 2 question paper. This is not a final marking scheme but it is prepared by us and best of our knowledge.
Let us start Answer key CBSE Computer Science Term 2 with section A. This question paper is based on CBSE Sample Paper 2022.
Watch this video for an explanation:
Topics Covered
Answer key CBSE Computer Science Term 2 – Section A
(Each question carries 2 marks)
Section A of Answer key CBSE Computer Science Term 2 contains 2 marks questions of each.
[1] “Stack is à linear data structure which follows a particular order in which the operations are performed.”
What is the order in which the operations are performed in a Stack?
Name the List method/function available in Python which is used to remove the last element from a list implemented stack.
Also write an example using Python statements for removing the last element of the list.
[2] (i) Expand the following: VoIP, PPP
(ii) Riya wants to transfer pictures from her mobile phone to her laptop. She uses Bluetooth technology to connect two devices. Which type of network (PAN/LAN/MAN/WAN) will be formed in this case?
[3] Differentiate between the terms Attribute and Domain in the context of Relational Data Model.
[4] Consider the following SQL table MEMBER in a SQL Database CLUB:
M_ID | NAME | ACTIVITY |
M1001 | Amina | GYM |
M1002 | Pratik | GYM |
M1003 | Simon | SWIMMING |
M1004 | Rakesh | GYM |
M1005 | Avneet | SWIMMING |
Assume that the required library for establishing the connection between Python and MYSQL is already imported in the given Python code. Also assume that DB is the name of the database connection for table
MEMBER stored in the database CLUB. Predict the output of the following code:
MYCUR DB.cursor ()
MYCUR. execute ("USE CLUB")
MYCUR.execute ("SELECT * FROM MEMBER WHERE ACTIVITY= 'GYM' )
R=MYCUR.fetchone ()
for i in range (2):
R=MYCUR. fetchone ()
print (R[0], R[1], sep = "#")
[5] Write output of SQL Queries (a) to (d) based on the table VACCINATION_DATA given below:
VID | NAME | AGE | DOSE1 | DOSE2 | CITY |
101 | Jenny | 27 | 2021-12-25 | 2022-01-31 | Delhi |
102 | Harjot | 55 | 2021-07-14 | 2021-10-14 | Mumbai |
103 | Srikanth | 43 | 2021-04-18 | 2021-07-20 | Delhi |
104 | Gazala | 75 | 2021-07-31 | NULL | Kolkata |
105 | Shiksha | 32 | 2022-01-01 | NULL | Mumbai |
(a) SELECT Name, Age FROM VACCINATION_DATA WHERE Dose2 IS NOT NULL AND Age > 40:
(b) SELECT City, COUNT(*) FROM VACCINATION_DATA GROUP BY City;
(c) SELECT DISTINCT City FROM VACCINATION_DATA;
(d) SELECT MAX (DOSE1), MIN(DOSE2) FROM VACCINATION DATA;
[6] Write the output of SQL queries (a) and (b) based on the following two tables DOCTOR and PATIENT belonging to the same database:
Table:Doctor
DNO | DNAME | FEES |
D1 | AMITABH | 1500 |
D2 | ANIKET | 1000 |
D3 | NIKHIL | 1500 |
D4 | ANJANA | 1500 |
TABLE: PATIENT
PNO | PNAME | ADMDATE | DNO |
P1 | NOOR | 2021-12-25 | D1 |
P2 | ANNIE | 2021-11-20 | D2 |
P3 | PRAKASH | 2020-12-10 | NULL |
P4 | HARMEET | 2019-12-20 | D1 |
(a) SELECT DNAME, PNAME FROM DOCTOR NATURAL JOIN PATIENT ;
(b) SELECT PNAME, ADMDATE, FEES FROM PATIENT P, DOCTOR D WHERE D. DNO = P.DNO AND FEES >1000;
[7] Differentiate between Candidate Key and Primary Key in the context Relational Database Model.
OR
Consider the following table PLAYER
Table : PLAYER
(a) Identify and write the name of the most appropriate column from the given table player that can be used as a Primary Key.
(b) Define the term degree in the relational data model. What is the degree of the given table Palyer?
Now in the next section of Answer key CBSE Computer Science Term 2 I am going to discuss questions from section B which of 3 marks.
Answer key CBSE Computer Science Term 2: SECTION – B
(Each question carries 3 marks)
In this section of Answer key CBSE Computer Science Term 2 there are 3 questions. Internal choice is given in question 8 for the stack. Let us see Answer key CBSE Computer Science Term 2 section B.
[8] Write the definition of a user-defined function PushNV (N) which accepts a list of strings in the parameter N and pushes all strings which have no vowels present in it, into a list named NoVowel.
Write a program in Python to input 5 words and push them one by one into a list named All.
The program should then use the function PushNV () to create a stack of words in the list Novowel so that it stores only those words which do not have any vowel present in it, from the list All Thereafter, pop each word from the list NoVowel and display the popped word. When the stack is empty display the message
“EmptyStack”.
NoVowel=[]
def PushNV(N):
for i in range(len(N)):
if 'A' in N[i] or 'E' in N[i] or 'I' in N[i] or 'O' in N[i] or 'U' in N[i]:
pass
else:
NoVowel.append(N[i])
All=[]
for i in range(5):
w=input("Enter Words:")
All.append(w)
PushNV(All)
while True:
if len(NoVowel)==0:
print("EmptyStack")
break
else:
print(NoVowel.pop()," ",end='')
OR
- Write the definition of a user-defined function Push3_5(N) which accepts a list of integers in a parameter N and pushes all those integers which are divisible by 3 or divisible by 5 from the list N into a list named Only3_5.
- Write a program in Python to input 5 integers into a list named NUM. The program should then use the function Push3_5() to create the stack of the list of Only3_5. Thereafter pop each integer from the list only3_5 and display the popped value. When the list is empty, display the message “StackEmpty”.
For example
If the integers input into the list NUM are
[10, 6, 14, 18, 301
Then the stack Only3 _5 should store
[10, 6, 18, 30]
And the output should be displayed as
30 18 10 StackEmpty
Only3_5=[]
def Push3_5(N):
for i in N:
if i %3==0 or i%5==0:
Only3_5.append(i)
NUM=[]
for i in range(5):
n=int(input("Enter the number to add to list:"))
NUM.append(n)
Push3_5(NUM)
print("List of Only 3-5:",Only3_5)
while True:
if Only3_5==[]:
print("StackEmpty")
break
else:
print(Only3_5.pop()," ",end='')
[9] (i) A SQL table ITEMS contains the following columns:
TNO, INAME, QUANTITY, PRICE, DISCOUNT
Write the SQL command to remove the column DISCOUNT from the table.
(ii) Categorize the following SQL commands into DDL and DML:
CREATE, UPDATE, INSERT, DROP
[10] Rohan is learning to work on Relational Database Management System (RDBMS) application. Help him to perform following tasks:
(a) To open the database named “LIBRARY”.
(b) To display the names of all the tables stored in the opened database.
(c) To display the structure of the table “BOOKS” existing in the already opened database “LIBRARY”.
In the next section of Answer key CBSE Computer Science Term 2 I am going to cover section C which contains 4 marks questions each. Here we go!
Answer key CBSE Computer Science Term 2 SECTION – C
(Each question carries 4 marks)
[11] Write SQL queries for (a) to (d) based on the tables PASSENGER and FLIGHT given below:
Table: Passenger
Table: Flight
[12] (i) Differentiate between Bus Topology and Tree Topology. Also, write one advantage of each of them.
OR
Differentiate between HTML and XML.
(ii) What is a web browser? Write the names of any two commonly used web browsers.
[13] Galaxy Provider Ltd. is planning to connect its office in Texas, USA with its branch Mumbai. The Mumbai branch has 3 Offices in three blocks located at distance from each other for different operations – ADMIN, SALES and ACCOUNTS.
As a network consultant, you have to Suggest the best network-related solutions for the issues/problems raised in (a) to (d), keeping in mind the distances between various locations and other given parameters.
Layout of the Offices in the Mumbai branch:
Admin Block to Sales Block | 300 m |
Sales Block to Accounts Block | 175 m |
Admin Block to Accounts Block | 350 m |
Mumbai Branch to Texas head Office | 14000 km |
Number of Computers installed at various locations are as follows:
ADMIN Block | 255 |
ACCOUNTS Block | 75 |
SALES Block | 30 |
TEXAS Block | 90 |
(a) It is observed that there is a huge data loss during the process of data transfer from one block to another. Suggest the most appropriate networking device out of the following, which needs to be
placed along the path of the wire connecting one block office with another to refresh the signal and forward it ahead.
(i) MODEM (ii) ETHERNET CARD (iii) REPEATER (iv) HUB
(b) Which hardware networking device out of the following, will you suggest connecting all the computers within each block?
(i) SWITCH (ii) MODEM (iii) REPEATER (iv) ROUTER
(c) Which service/protocol out of the following will be most helpful to conducting live interactions of employees from Mumbai Branch and their counterparts in Texas ?
(i) FTP (ii) PPP (iii) SMTP (iv) VolP
(d) Draw the cable layout (block to block) to efficiently connect the three offices of the Mumbai branch.
Answer:
(a) repeater
(b) Switch
(c) VoIP
(d)
Follow this link for the answer key of informatics practices class 12:
I hope this article will help you to verify the answers and predict your score for term 2 computer science exam. Feel free to share your views in the comment section. Thank you for reading this!