Students can access the CBSE Sample Papers for Class 11 Computer Science with Solutions and marking scheme Term 2 Set 2 will help students in understanding the difficulty level of the exam.

CBSE Sample Papers for Class 11 Computer Science Term 2 Set 2 with Solutions

Time: 2 Hours
Maximum Marks: 35

General Instructions:

  • The question paper is divided into 3 sections -A, B and C
  • Section A, consists of 7 questions (1-7). Each question carries 2 marks.
  • Section B, consists of 3 questions (8-10). Each question carries 3 marks.
  • Section C, consists of 3 questions (11-13). Each question carries 4 marks.
  • Internal choices have been given for question numbers 7, 8 and 12.

Section – A [2 marks each]

Question 1.
Write output of the following code snippets. (2)
list1, list2 = [123, ‘xyz’], [456, ‘abc’]
list1. extend (list2)
print(list1)
print(listl. index (456))
list1. insert (3, ‘Hello’)
print(list1)
del listl [2]
print(list1)
Answer:
Output
[123, ‘xyz’, 456, ‘abc’]
2
[123, ‘xyz’, 456, ‘HelIo’, ‘abc’]
[123, ‘xyz’, ‘Hello’, ‘abc’]
>
extend( ) method adds the specified list elements (or any iterable) to the end of the current list.
insert( ) method inserts the specified value at the specified position.

CBSE Sample Papers for Class 11 Computer Science Term 2 Set 2 with Solutions

Question 2.
(a) Write the suitable method to add an element in the beginning of the list.
Answer:
insert (0, value)
Commonly Made Error:
Students do not count the index number from 0 for the first element.

Answering Tip:
While answering any of the question related to index numbers do remember that index for first number is always 0 and last number has index -1 for backward indexing.

(b) What are digital footprints? [1+1]
Answer:
The records and traces left behind by any individual’s online activities are his digital footprints Whatever one does online – visiting sites, online shopping, using social media accounts, etc. all create digital footprints.

Question 3.
Write a python program to calculate area of a triangle after obtaining its three sides (a, b, c) using [2]
Herons formula s = \(\frac{(a+b+c)}{2}\)
Area = \(\sqrt{s(s-a)(s-b)(s-c)}\)
Answer:
import math
a = float (input (“Enter first side of triangle :”))
b = float (input (“Enter second side :”))
c = float (input (“Enter third side :”))
s =(a + b + c)/2
area = math.sqrt (s * (s-a) * (s-b) * (s-c))
print (” Area of triangle is “, area)

Question 4.
Write ways each in which the following affects a computer system.
(a) VIRUS
Answer:
VIRUS
(a) A VIRUS infects system files thus making a system to behave unexpectedly.
(b) A VIRUS tends to slow down the system by executing itself in the background.

(b) Ransomware
Answer:
Ransomware sneaks into a system through e-mail attachments or wThen a user clicks some suspicious link. These then put the system resources on hostage and ask for paying ransom to some account to release these resources.

Question 5.
Find the output of the following questions based on given dictionary:
Employee-{‘NameYRakesh’, ‘Dept’: ‘Accountant’, ‘Salary’: 25000}
(i) Employee .keys ( )
Answer:
{‘Name’,’Dept’,’Salary’}

(ii) Employee .values ( )
Answer:
{‘Rakesh’, ‘Accountant’, 25000}

(iii) Employee [‘Age’] = 25
Answer:
{‘Name’: ‘Rakesh’, ‘Dept’: ‘Accountant’,’Salary’: 25000, ‘Age’: 25}

(iv) Employee .pop (‘Dept’)
Answer:
‘Accountant’

CBSE Sample Papers for Class 11 Computer Science Term 2 Set 2 with Solutions

Question 6.
(i) How can we protect identity online?
Answer:
(a) Never list your full name, parent’s details, home address or telephone numbers online.
(b) Create a separate e-mail address that is used only with social media sites.
(c) Never share your location online.

(ii) What is IT Act? [1 + 1]
Answer:
The Government of India’s The Information Technology Act, 2000 (also known as IT Act), was amended in 2008, and provides guidelines to the user on the processing, storage and transmission of sensitive information.

Question 7.
Write a program to calculate and display the sum of all odd numbers in a list.
OR
What is math module? Name any four mathematical functions which are used in python. [2]
Answer:

size = int(input("Enter the size of the list: ")) 
sum = 0
int_list = [ ]
for i in range(size):
n = int(input("Enter element:")) 
int_list.append(n) 
for i in range(size):
if(int_list[i] % 2 != 0): 
sum + = int_list[i]
print("Sum of odd numbers : {} " (sum))

OR

In Python, math module is used to perform mathematical functions. Definitions of all mathematical functions are stored in math module. To perform mathematical functions one must import the math module. Various mathematical functions are as follows:
(i) sqrt( )
(ii) ceil( )
(iii) floor( )
(iv) fabs( )

CBSE Sample Papers for Class 11 Computer Science Term 2 Set 2 with Solutions

Section – B [3 marks each]

Question 8.
Define E-waste. How can E- waste be reduced?
OR
How does eavesdropping leads a victim to give personal information?
Answer:
E-waste or Electronic waste includes electric or electronic gadgets and devices that are no longer in use. Hence, discarded computers, laptops, mobile phones, televisions, tablets, music systems, speakers, printers, scanners etc. constitute e-waste when they are near or end of their useful life. Globally, e-waste constitutes more than 5 per cent of the municipal solid waste. Therefore, it is very important that e-waste is disposed off in such a manner that it causes minimum damage to the environment and society.
OR
Eavesdropping activities do not affect normal operation of transmission and communication. Therefore, both the sender as well as the recipient is unaware of it. If there is any security breach in communication such as an email not being encrypted or without a digital signature it can easily be intercepted. Now the attacker defaces the normal email and deceives the recipient in believing it and give out personal or sensitive information. This type of interception is also known as Man-in-the Middle-attack.

Commonly Made Error:
Eavesdropping is thought to be an act of cyber bullying by most students.

Answering Tip:
You have to write only about eavesdropping and not about any other cybercrime.

Question 9.
(i) How do you add key value pair to an existing dictionary:
Answer:
Dictionary Name[Key] = Value

(ii) How can a list be updated? Explain with examples.
Answer:
To update a list, we can directly assign new value to it by using indices or append the elements at the end of the list using append ().

e.g., 1.
list1 = [4, 6, 7,8, 9] 
list1[3] = 11 
print (list1) 
output 
[4,6,7,11,9] 
e.g., 2.
Iist2 = [12,13,15,18] 
list2.append (19) 
print (list2) 
output
[12,13,15,18,19]
extend () method can be used to add a list of elements at the end of an existing list.
e.g., 3.
list3 = [105,107,109, 111]
11=[113,115,117] 
list3. extend(11) 
print (list3) 
output
[105,107,109, 111, 113,115,117].

Commonly Made Error:
Students tend to write about update method from list updation, which is not a method.

Answering Tip:
Write about all the list methods that are used to add an element to the list.

CBSE Sample Papers for Class 11 Computer Science Term 2 Set 2 with Solutions

Question 10.
How can we maintain data confidentiality?
Answer:
To maintain data confidentiality, we should do following things:

  • Data access should be managed to ensure confidentiality of data. Access should be allowed to the authenticated users. Access can be controlled by making strong password.
  • We should protect our devices and documents from misuse. We should keep them in a secure place. Never leave device and sensitive information on a place where they can easily be stolen by the attacker.
  • When data is no longer useful than it should be destroyed carefully so that it can’t be misused by anyone.

Section – C [4 marks each]

Question 11.
Write a program to input any two matrices and print product of matrices. [4]
Read the case study given below and attempt any 4 sub-questions (out of 5). Each sub-question carries 1 mark.
Answer:

import random
m1 = int(input ("Enter number of rows in first matrix")) 
n1 = int(input ("Enter number of columns in first matrix")) 
a = [[random.random ( ) for row in range (m1)] for col in range (n1)] 
for i in range (m1): 
for j in range (n1): 
a[i][j] = int(input ( ))
m2 = int(input ("Enter the number of rows in the second matrix")) 
n2 = int(input ("Enter the number of columns in the second matrix")) 
b = [[random.random () for row in range (m2)] for col in range (n2)] 
for i in range (m2): 
for j in range (n2): b[i][j] = int(input ())
c = [[random.random 0 for row in range (m1)] for col in range (n2)] 
if (n1 == m2):
for i in range (m1): 
for j in range (n2): 
c[i][j] = 0 
for k in range (n1): 
c[i][j] += a[i][j]*b[i][j]
for s in c: 
print(s) 
else:
print("Multiplication is not possible")

Question 12.
(i) What is the use of Reduce process in e-waste management? [4]
OR
How can you manage your digital footprint?
Answer:
We should try to reduce the generation of e-waste by purchasing the electronic or electrical devices only according to our need. Also, they should be used to their maximum capacity and discarded only after their useful life has ended. Good maintenance of electronics devices also increases the life of the devices.
OR
(a) Keep a list of accounts that you have created.
(b) Close the ones that you don’t need (less clutter – more clarity)
(c) Be consistent and cordial about what you say online, especially if you are hoping for recruitment (no tantrums or arguments!)
(d) When in doubt, do not post. It is impossible to completely erase (or take second opinion or even a third)
(e) Use tools such as Grammarly to keep language and grammar accurate.
(f) Ensure that you check your privacy settings regularly, especially on social media.

CBSE Sample Papers for Class 11 Computer Science Term 2 Set 2 with Solutions

(ii) Write a short note on hacking. [2+2]
Answer:
Hacking refers to the act of breaking into a system by finding any security breach and using the system’s resources for one’s own personal gains. When hacking is done to find out a security breach in a system to make it fool proof it is termed as ethical hacking. Hacking is punishable under law. People who hack a system are known as hackers. They can be black hat, white hat or grey hat hackers.

Question 13.
Read the following text and answer the following questions on the basis of the same:
A dictionary in Python is the unordered and changeable collection of data values that holds key value pairs. Each key value pair in the dictionary maps the key to its associated value making it more optimized. A dictionary in Python is declared by enclosing a comma separated list of key value pairs using curly braces ({}). Python dictionary is classified into two elements: keys values. Keys will be a single element. Values can be a list or list within a list, numbers, etc.
(i) What is the type of Dictionary in Python?
Answer:
Dictionary is mutable type. But key of dictionary are immutable type.

(ii) The unordered and changeable collection of data values that holds key value pairs is:
Answer:
Python dictionary.

(iii) Which type of bracket is used to define dictionary?
Answer:
To define Dictionary curly braces ( { } ) is used.

(iv) What are keys in dictionary?
Answer:
In Dictionary, Keys are the single element.

CBSE Sample Papers for Class 11 Computer Science Term 2 Set 2 with Solutions

(v) How many elements are classified by Python Dictionary? [4]
Answer:
Keys Values, there are two elements classified by Python.