Computer Science Class 12 Term 2 Solved Sample Paper

Computer Science CBSE Class 12 Term 2 (II) Solved Sample paper for 2022 CBSE Board exam. The Practice question Paper of 2 hrs, designed as per 2021-2022 Term 2 syllabus.

Computer Science CBSE Class 12 (Term 2) Exam

Total Marks : 35
Time : 2 hrs
N.O of Questions : 13

Q.1. a)Find the output of the following code: (1 mark)

result=0
numberList=[10,20,30]
numberList.append(40)
result=result+numberList.pop()
result=result+numberList.pop()
print(“Result=”,result)

Answer: Result= 70

b). Find the output of the following code: (1 mark)

answer=[]; output=”
answer.append(‘T’)
answer.append(‘A’)
answer.append(‘M’)
ch=answer.pop()
output=output+ch
ch=answer.pop()
output=output+ch
ch=answer.pop()
output=output+ch
print(“Result=”,output)

Answer: Result= MAT

Q.2.What is DNS? What is a DNS server? (2 marks)

Answer:
DNS (Domain Name System):-
The Domain Name is unique name assigned to a website.
DNS server:
Instead of remembering IP addresses, we assign a domain name to each IP. But, to access a web resource, a browser needs to find out the IP address corresponding to the domain name entered. Conversion of the domain name of each web server to its corresponding IP address is called domain name resolution. It is done through a server called DNS server.

Q.3. Differentiate between FTP and HTTP. (2 mark)

Answer: FTP is a protocol to transfer files over the internet. While HTTP is a protocol which allows the use of HTML to browse web pages in the World Wide Web.

Q.4. What is TCP/IP? ( 2mark)

Answer: TCP/IP (Transmission Control Protocol/internet Protocol) is a protocol for communication between computers used as a standard for transmitting data over networks and is the basis for standard Internet protocols. It is also responsible for assembling packets at the receiver’s side.

Q.5.Define the term Network topology. What are the popular network topologies? (2 marks) 2 marks

Answer:
Topology: Topology refers to the way in which the workstations attached to the network are interconnected.

The most popular topologies are:

1. Bus or Linear Topology: – In this topology, all devices on network are connected to a single continuous cable called a bus. Transmission from any station travels the length of the bus in both directions and can be received by all other stations. The destination device, on identifying the address on data packet copies the data onto its disk. When the data packet reaches at either end the terminator on that end absorbs the signal, removing from the bus.
This topology can be used for smaller networks.

2. Ring Topology: – A LAN using the ring topology is connected in the closed loop. The data packets transmitted, circulate along the ring. The destination station copies the packet content on recognizing its address on the packet. After a packet travels a full circle, it is removed at the source station.

3. Star Topology: – In this topology each workstation is directly linked to a central node. Devices can be easily plugged or unplugged to the central node, as need dictates. Any communication between the stations must pass through the central node.

4. Tree Topology: – In this topology the network is shaped as an inverted tree with the central root branching and sub-branching to the extremities of the network. Transmission in this topology takes place in the same way as in bus topology.

Q.6. Define the following terms: (2 mark)
(a) Relation
(b) Domain
(c) Tuple
(d) Attribute

Answer:
(a) Relation :- Data arrange in row and columns and having certain properties.
(b) Domain :- This is a pool of values from which the actual values appearing in a given column are drawn.
(c) Tuple :- A row of a relation is known as tuple.
(d) Attribute :- A column of a relation is known as attribute.

Q.7.What do you understand by the terms candidate key and cardinality of a relation in a relational database? ( 2 marks)

Answer:
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.

Q.8.Write the output produced by the following SQL commands:(3 marks)
a)SELECT POW(2,3);
b)SELECT ROUND(123.2345, 2), ROUND(342.9234,-1);
c)SELECT LENGTH(“Informatics Practices”);
d)SELECT YEAR(“1979/11/26”), MONTH(“1979/11/26”),    DAY(“1979/11/26”),
MONTHNAME(“1979/11/26”);
e)SELECT LEFT(“INDIA”,3), RIGHT(“Computer Science”,4);
f)SELECT MID(“Informatics”,3,4), SUBSTR(“Practices”,3);

Answer: A = 

POW(2,3)
8

B= 

ROUND(123.2345, 2),ROUND(342.9234,-1);
123.23340

 C=

LENGTH(“Informatics Practices”)
21

D=

YEAR(“1979/11/26”)MONTH(“1979/11/26”)DAY(“1979/11/26”)MONTHNAME(“1979/11/26”)
19791126November

 E =

LEFT(“INDIA”,3)RIGHT(“Computer Science”,4)
IND                       ence                                             

 F =

MID(“Informatics”,3,4)SUBSTR(“Practices”,3)
form                                actices 

Q.9. What is the significance of MAC address? (3 marks)

Answer:
The NIC manufacturer assigns a unique physical address to each NIC card; this physical address is known as Media Access Control address (MAC address). A MAC address is a 6-byte address with each byte separated by a colon e.g., a sample MAC address could be:
10 : B5 : 03 : 63 : 2E : FC
So, now you know that this MAC address is actually the number assigned to the network card of your computer. The first three bytes of MAC address are the manufacturer-id (assigned to the manufacturer by an international organization namely IEEE) and the last three bytes are the card-no (assigned by manufacturer).

Q.10.Write a program to reverse a string using stack. ( 3 marks)

Answer:

stack = "csstudy.in"
lst = list(stack)
new_stack = ""

for i in range( len(stack) ):
	new_stack += lst.pop()

print(new_stack)

Q.11.Explain the following devices: (4 marks)
(a) Switch
(b) Repeater
(c) Router
(d) Gateway
(e) NIC

Answer:
(a) Switch:-
A switch is a device that is used to segment networks into different sub-networks called sub-nets or LAN segments. Segmenting the network into smaller subnets, prevents traffic overloading in a network.
A switch is responsible for filtering i.e., transforming data in a specific way and for forwarding packets (a piece of message being transmitted) between LAN segments. Switch can support any packet protocol. LANs that are segmented through switches are called Switched LANS.
(b) Repeater: – A repeater is an analog device that works with signals on the cables to which it is connected. The weakened signal appearing on the cable is regenerated and put back on the cable by a repeater.
(c) Router: – A router works like a bridge but can handle different protocols.
(d) Gateway: – Device that connects dissimilar network.
(e) NIC:-
Ethernet card, also known as Network Interface Card (NIC card in short) is a network adapter used to set up a wired network. It acts as an interface between computer and the network. It is a circuit board mounted on the motherboard of a computer. The Ethernet cable connects the computer to the network through NIC. Ethernet cards can support data transfer between 10 Mbps and 1 Gbps (1000 Mbps). Each NIC has a MAC address, which helps in uniquely identifying the computer on the network.

Computer Science CBSE Class 12 Term 2 Solved Sample Paper

Q.12.- Consider the given table Faculty and answer the questions that follow:(4 marks)

Computer Science Class 12 Term 2  Solved Sample Paper

(a) To display the details of those Faculty members whose salary is higher than 12000.
(b) To display the details of Faculty members whose salary is in the range of 8000 to 12000 (both values included).
(c) Count the number of different id from faculty.
(d) Count the number of faculty members getting salary as 10000.
(e) Display details of those faculty members whose names start with S.
(f) Display all records in descending order of Hire date.
(g) Find the maximum and the minimum salary.

Answer:
(a) Select * from Faculty where salary > 12000 ;
(b) Select * from Faculty where salary between 8000 and 12000 ;
(c) Select count( F_ID ) from Faculty ;
(d) Select count( * ) from Faculty where Salary = 10000 ;
(e) Select * from Faculty where F_Name like “S%” ;
(f) Select * from Faculty order by Hire_date DESC ;
(g) Select MAX( Salary ), Min ( Salary ) from Faculty ;

Q.13-Consider the following MOVIE database and answer the SQL queries based on it. (4 marks)

MovieIDMovieNameCategoryReleaseDateProductionCostBusinessCost
001Hindi_MovieMusical2018-04-23124500130000
002Tamil_MovieAction2016-05-17112000118000
003English_MovieHorror2017-08-06245000360000
004Bengali_MovieAdventure2017-01-0472000100000
005Telugu_MovieAction100000
006Punjabi_MovieComedy30500

a) Retrieve movies information without mentioning their column names.
b) List business done by the movies showing only MovieID, MovieName and BusinessCost.
c) List the different categories of movies.
d) Find the net profit of each movie showing its ID, Name and Net Profit.
(Hint: Net Profit = BusinessCost – ProductionCost)
Make sure that the new column name is labelled as NetProfit. Is this column now a part of the MOVIE relation.  If no, then what name is coined for such columns?  What can you say about the profit of a movie which has not yet released? Does your query result show profit as zero?
e) List  all  movies  with  ProductionCost  greater  than  80,000  and  less  than  1,25,000  showing  ID,  Name and ProductionCost.
f) List all movies which fall in the category of Comedy or Action.

Answer:
a = Select MovieID as “”, MovieName as “”, Category as “” , ReleaseDate as “” , ProductionCost as “” , BusinessCost as “” from movie ;
b = Select MovieID, MovieName , BusinessCost from movie ;
c = Select distinct ( Category ) from movie ;
d = Select MovieID, MovieName , (BusinessCost – ProductionCost) as “Netprofit” from movie ;
No, this column is not a part of the MOVIE relation.
Column alias is coined for such columns.
If movie is not released than our query return negative values .
e = Select * from movie where ProductionCost between 80000 and 125000 ;
f = select * from movie where category = “Comedy” or category = “Action” ;
g = select * from movie where releaseddate is null ;

Thanks for reading Computer Science Class 12 Term 2 Solved Sample Paper. These are some valuable content below –

Python Programs for CBSE Practical File Class 11 and 12

Computer Science with Python Class 12 Sumita Arora Solutions

.

1 thought on “Computer Science Class 12 Term 2 Solved Sample Paper”

Leave a Comment

Your email address will not be published.