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:
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.
 “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.
The operations are performed in a stack follows Last In First Out (LIFO) order.
The pop() method/function available in Python which is used to remove the last element from a list implemented stack.
 (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?
(i) VoIP – Voice over Internet Protocol
PPP – Point to Point Protocol
 Differentiate between the terms Attribute and Domain in the context of Relational Data Model.
The vertical data set of a relation is known as attribute. It is also known as field or property. It represents one entity. For example customerid and customername are attributes for customer relation.
The domain refers to the pool of values from which a field of a table derives its values.
Example customerid field derives its values from set of integers, customername derives from the names which are set of characters.
 Consider the following SQL table MEMBER in a SQL Database CLUB:
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, R, sep = "#")
 Write output of SQL Queries (a) to (d) based on the table VACCINATION_DATA given below:
(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;
(a) NAME AGE
(b) city count(*)
(c) distinct city
(d) max(dose1) min(dose2)
 Write the output of SQL queries (a) and (b) based on the following two tables DOCTOR and PATIENT belonging to the same database:
(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;
(a) DNAME PNAME
(b) PNAME ADMDATE FEES
———————- —————– ————————
NOOR 2021-12-25 1500
HARMEET 2019-12-20 1500
 Differentiate between Candidate Key and Primary Key in the context Relational Database Model.
Candidate Key: The columns which can serve as primary key of a table is known as candidate keys. There can be multiple candidate for a relation.
Primary Key: Primary key is a field name which identifies rows uniquely. There can be only one primary key for a relation.
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?
(b) Degree refers to the number of attributes or columns of the relation. The degree of table player is: 3
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.
 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
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='')
- 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”.
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='')
 (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
(i) alter table items drop column discount;
(ii) DDL: CREATE, DROP
DML: INSERT, UPDATE
 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”.
(a) use library;
(b) show tables;
(c) desc BOOKS;
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)
 Write SQL queries for (a) to (d) based on the tables PASSENGER and FLIGHT given below:
(a) update flight set fare=6000 where FNO=’F104′;
(b) select gender, count(*) from passenger group by gender;
(c) select name, fare, f_date from passenger p, flight f where p.fno=f.fno and start=’DELHI’;
(d) delete from flight where end=’MUMBAI’;
 (i) Differentiate between Bus Topology and Tree Topology. Also, write one advantage of each of them.
1. It requires a single line cable to connect all the computers in the network.
2. It is less secured compared to tree toplolgy.
3. It is very simple and easy to configure.
4. It is also known as linear topology.
1. The comoputers are connected in hierarchical form of tree.
2. It provides high security.
3. It is largely coplex compared to bus toplogy.
4. It is also known as hierarchical topology.
Differentiate between HTML and XML.
1. It stands for Hyper Text Markup Language.
2. It is markup language.
3. It is case insensitive language.
4. HTML tags displays data.
1. It stands for eXtensible Markup Language.
2. It provides framework or structure to define mark up languages.
3. It is case sensitive language.
4. XML tags are used to defined data or new tags.
(ii) What is a web browser? Write the names of any two commonly used web browsers.
A web browser is a computer software or application or program, that is used to render or access the website from internet. Google Chrome and Mozilla Firefox are two commonly used web browsers.
 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:
(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.
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!