Students must start practicing the questions from CBSE Sample Papers for Class 11 Computer Science with Solutions Set 10 are designed as per the revised syllabus.

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

Time Allowed: 3 hours
Maximum Marks: 70

General Instructions:

  • All questions are compulsory.
  • Attempt all parts of each question
  • Internal choices are given, choose any one of them.

Question 1.
(a) One octet represents ……………………… bits.
(A) 8
(B) 16
(C) 32
(D) 1024
Answer:
(A) 8

(b) \t is used to present the output in table form. (True/False)
Answer:
True

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

(c) Write the output of the following.
a = (23, 34, 65, 20, 5)
print(a[0] + a.index(5))
(A) 28
(B) 29
(C) 27
(D) 26
Answer:
(C) 27

Explanation:
We can use the index operator [] to access an item in a tuple, where the index starts from 0.

(d) Predict the output of the following code if:
mydict = {‘a’:23,’b’: ’78’/c’:89, ‘d’:36}
>>>del mydict[‘c’]
>>> print mydict
(A) {‘a’:23, ‘b’: ’78’,’c’:89/d’:36}
(B) {‘a’:23,’b’: 78, ‘d’:36}
(C) {‘a’:23, ‘b’: ’78’,89, ‘d’:36}
(D) {‘a’:23/’b’: 78’/’d’:89, ‘e’:36}
Answer:
(B) {‘a’:23,’b’: 78, ‘d’:36}

Explanation:
del keyword is used to remove individual items or the entire dictionary itself.

(e) In Python, variables refer to ……………………
Answer:
Objects

(f) What type of error will be produced in this code? while True:
print(‘Hello world’)
File “<stdin>”, line 1
while True
print(‘Hello world’)
Answer:
SyntaxError: invalid syntax

(g) List a few precautions to be taken while using public computer. [2]
Answer:
To work on a public computer, make sure to:

  • Browse privately
  • Do save your login information
  • Avoid entering sensitive information
  • Never leave your computer unattended
  • Disable the feature that stores password
  • Log out properly before leaving
  • Clear history and cookies.

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

(h) Read the following text and answer the following questions on the basis of die same:
The technique to represent and work with numbers is called number system. Decimal number system is the most common number system. Other popular number systems include binary number system, octal number system, hexadecimal number system, etc. Decimal number system is a base 10 number system r having 10 digits from 0 to 9. The number system having just these two digits – 0 and 1 – is called binary number system. Octal number system has eight digits – 0,1,2,3,4,5,6 and 7. Hexadecimal number system has 16 symbols – 0 to 9 and A to F where A is equal to 10, B is equal to 11 and so on till F. [5]
1. The value of radix in binary number system is _____________
(A) 2
(B) 8
(C) 10
(D) 1
Answer:
(A) 2

Explanation:
In a binary number system, the value of base or radix is 2. The binary system uses only two digits for the representation of numbers, therefore its base id has chosen to be 2

2. Which of the following number system is known as base-10 system?
(A) Binary Number System
(B) Hexadecimal Number System
(C) Octal Number System
(D) Decimal Number System
Answer:
(D) Decimal Number System

Explanation:
Decimal number system is a base 10 number system having 10 digits from 0 to 9. This means that any numerical quantity can be represented using these 10 digits. Decimal number system is also a positional value system.

3. Which two’s form the binary number system?
(A) 0 and 2
(B) 1 and 2
(C) 0 and 1
(D) 1 and 3
Answer:
(C) 0 and 1

Explanation:
The number system having just these two digits – 0 and 1 – is called binary number system.
Each binary digit is also called a bit. Binary number system is also positional value system, where each digit has a value expressed in powers of 2.

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

4. Which of the following is not an example of octal number?
(A) 123
(B) 478
(C) 372
(D) 136
Answer:
(B) 478

Explanation:
Octal number system has eight digits – 0, 1, 2, 3, 4, 5, 6 and 7. Octal number system is also a positional value system with where each digit has its value expressed in powers of 8.

5. In hexadecimal system, each alphanumeric digit is represented as a group of ……………………….. binary digits
(A) 1
(B) 2
(C) 3
(D) 4
Answer:
(D) 4

Question 2.
(a) The input() function always returns a value of type [1]
Answer:
String

(b) Python can’t be used for game development. (True/False) [1]
Answer:
False

(c) What will be the output of the following code? Iftpl [2]
fruits = [“apple”, “banana”, “cherry”]
for x in fruits:
print(x)
Answer:
apple
banana
cherry

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

(d) Differentiate between DRAM and SRAM. [4]
OR
Differentiate between NAND gate and NOR gate. Also give their truth table.
Answer:

DRAM SRAM
(i) A DRAM cell consists of only one transistor and one capacitor. A SRAM consists of internal flip-flops.
(ii) It has a large number of cells packed within the chip. The number of cells on a SRAM chip is less.
(iii) It needs to be refreshed (about thousand times in a second) to retain the stored data. It retains data as long as the power is supplied to it i.e. there is no need to refresh it.
(iv) DRAMs are used in primary storage sections of most computers. SRAMs are used in specialized applications.

OR

NAND GATE NOR GATE
AND followed by NOT OR followed by NOT
Generates false only if both the inputs are true. Generates true only if both the inputs are false.
It implements the logical function called conjunction. If implements the logical function called disjunction.

The truth-table of NAND gate is:

A B Output
0 0 1
0 1 1
1 0 1
1 1 0

The truth-table of NOR gate is:

A B Output
0 0 1
0 1 0
1 0 0
1 1 0

(e) Write a Python program to find reverse of a number. [4]
Answer:

n = int(input("Please Enter any Number: "))
Rev = 0 while(n > 0):
Rem = n%10
Rev = (Rev *10) + Rem
n = n //10
print("\n The Reverse of a number is = %d" %Rev)

Commonly Made Error:
The student must use the logic accurately

Answering Tip:
In the above program rem stands for remainder

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

Question 3.
(a) What are shareware? Give its examples. [2]
Answer:
Shareware is software which is made available with a right to redistribute copies. It is also known as ” Try Before You Buy”. For example: Wonders share, Kaspersky antivirus etc

(b) Define password guessing attack. [2]
Answer:
In password guessing attack, hackers try to crack password of a system to break into it and then use the information stored for causing substantial damage.

(c) What are cookies? [1]
Answer:
Cookies are small text files on a computer storing small pieces of information related to one’s online habits.

Question 4.
(a) Mr. Pawan a computer teacher has today taught his students about basics of Python. He gave them the following questions to solve. Find their answers. [4]
when num1 = 4, num2 = 3, num3 = 2.
(i) num1 + = num2 + num3
print (num1)
(ii) num1 = num1 ** (num2 + num3)
(iii) print(‘Bye’ = = ‘BYE’)
(iv) num1 = float (10)
print (num1)
Answer:
(i) 9
(ii) 1024
(iii) 10.0
(iv) False

(b) List the various dictionary functions. [4]
OR
How many ways an item can be deleted from dictionary?
Answer:
The various dictionary functions are: [4]
len( ) – It returns the number of key-value pairs in the dictionary.
Syntax:
len(dictionary_name)

clear( ) – It removes all items from the dictionary.
Syntax:
dictionary_name.clear( )

get( ) -It returns the value of a given key in the dictionary.
Syntax:
dictionary_name.get(key)

items( ) – It returns all the key-value pairs in the dictionary.
Syntax:
dictionary_name.items( )

keys( ) – It returns the list of keys used in the dictionary.
Syntax:
dictionary_name.keys( )

values( ) – It returns the list of values defined in the dictionary.
Syntax:
dictionary_name.values( )

OR

There are two methods to delete elements from a dictionary:
(i) Using del statement:
Syntax:
del dictionary-name [key]

Example:

> > > marks
{'physics': 75, 'Chemistry': 78, 'Maths': 81, 'CS': 84, 'English': 89}
> > >del marks ['English']
> > > marks
{'physics': 75, 'Chemistry': 78, 'Maths': 81, 'CS': 84}

(ii) Using pop( ) method: It deletes the key-value pair and returns the value of delete delement.
Syntax:
dictionary-name.pop( )
Example:

> > > marks
{'physics': 75, 'Chemistry': 78, 'Maths': 81, 'CS': 84}
> > >marks.pop('Maths')

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

Question 5.
(a) Given a set of 100 integers, draw a flowchart to count number of odd and even integers, find product of odd integers and sum of even integers. [4]
Answer:
CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions 1

(b) Explain the flow of compilation in detail. [4]
Answer:
The compilation undergoes these steps:
1. Preprocessing: This phase removes comments from source code. Carries out all preprocessor directives such as macro substitution, inclusion of header files etc. Imported modules are added to the code. The source code gets converted into the complete code.

(2) Compilation: This phase has two sub-phases:
(i) Analysis: In this phase, all tokens of the source code are identified and a symbol table containing the information and details of all the tokens is created. This is also known as the front-end phase of compilation.

(ii) Synthesis: In this phase, the compiler passes the code, analyses the syntax of the source code and generates a syntax tree.
If during above two phases of compilation any syntax or semantic errors are found an error along with line number is generated. All the errors found in the source code are listed with line numbers. The errors are now corrected and program is compiled. The error – free code is converted into assembly level instructions called intermediate code.

3. Assembly Phase: This phase converts the assembly level instructions into object code.

4. Linking: In this phase all the required libraries are linked with the object code by the linker.

5. Loader: The loader is a part of compiler that loads the computer executable module into memory for execution

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

Question 6.
(a) Write short note on Membership Operators. [2]
Answer:
Python has membership operators which test for membership in a sequence such as strings, lists, or tuples. There are two membership operators explained below:

Operator Description Example
in Evaluates to true if it finds a variable in the specified sequence and false otherwise. Y = [ ] if x in
y: returns 1
if x is a member of sequence y.
not in Evaluates to true if it does not find a variable in the specified sequence and false otherwise. Y = [ ] if x not in
y: here not in results in a 1
if x is not a member of sequence y.

(b) Write short note on Identity Operators [2]
Answer:
Identity operators compare the memory locations of two objects. There are two Identity operators explained below: [2]

Operator Description Example
is Evaluates to true if the variables on either side of the operator point to the same object and false otherwise. x is y, here is results in 1 if id(x) equals id(y).

 

is not Evaluates to false if the variables on either side of the operator point to the same object and true otherwise. x is not y, here is not results in 1 if id(x) is not equal to id(y).

(c) List the several built-in functions to perform conversions from one data type to another [4]
Answer:
There are several built-in functions to perform conversions from one type to another.

Function Description
int(x [,base]) Converts x to an integer, base specifies the base if x is a string.
long(x [,base] ) Converts x to a long integer, base specifies the base if x is a string.
float(x) Converts x to a floating- point number.
complex(real [,imag]) Creates a complex number.
str(x) Converts object x to a string representation.
repr(x) Converts object x to an expression string.
eval(str) Evaluates a string and returns an object.
tuple(s) Converts s to a tuple.
list(s) Converts s to a list.
set(s) Converts s to a set.

Question 7.
(a) Which of the following is a cyber-crime ? [1]
(a) Cyber trolling
(b) User tracking
(c) Spreading rumor’s online
(d) Cyber stalking
Answer:
Cyber trolling, spreading rumour’s online and cyber stalking are cyber-crimes.

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

(b)
(i) Write two ways in which a system can be physically protected.
(ii) What are audit logs?
(iii) What should you do if you became victim of phishing attack? Write any two measures.
(iv) Digital certificates are same as digital signatures. (True/False)
OR
Cite examples depicting that you were a victim of following cyber crime. Also, cite provisions in IT Act to deal with such a cyber crime.
(a) Identity theft
(b) Credit card account theft [NCERT]
Answer:
(i) The two ways in which a system can be physically protected are:
1. Keeping sensitive data on standalone machines instead of networks.
2. Using security locks and smart cards.
(ii) Audit or activity logs are used to track about who has been doing what on the system
(iii) 1. Disconnect the computers from internet.
2. Take the infected computer to a professional who specialize in malware removal
(iv) False

OR

(a) Identity theft: A user’s identifiable personal data like email ID, banking credentials, passport PAN, Aadhaar number etc. are stolen and misused by the hacker on behalf of the victim. There can be many ways in which the criminal takes advantage of an individual stolen identity like:

(b) Financial identity theft: when the stolen identity is used for financial gain.
Credit card account theft is when someone steals the credit card detail for financial gain. Under Section 66C of IT Act 2000, whoever, fraudulently steals the identity of any other person, shall be punished with imprisonment of either description for a term which may extend to three years and shall also be liable to fine which may extend to lakhs.

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

Question 8.
(a) Rahul is participating in a debate competition on the topic technology a boon . He is speaking in favour of the motion help him collect points for his speech. [3]
Answer:

  • New Technology improves quality of life for human beings:
  • Technology is the reflection of people’s imagination on solving existing problems. Technology such as computers, smartphones, lap-top, etc. have made life easier.
  • Exchanging information, making faster decisions, interacting socially, entertainment, financial transaction processing, online shopping, managing homes all have become as easy and fast as blink of an eye. These technologies though have made life easier
  • The advancement in technology has made many tasks simple and easy as compared to the conventional ways.
  • Sending and receiving messages, documents etc has become a matter of few minutes and is much cheaper.
  • No more stepping out early from home to wait for a taxi or public transport for going somewhere.

Question 9.
(a)
(i) When will following statement in interpreter result into error: > > > B+4 [1]
(ii) How can we change the value of 6*1-2 to -6 from 4? [1]
Answer:
(i) When B is a string
(ii) (6*1)-2

CBSE Sample Papers for Class 11 Computer Science Set 10 with Solutions

(b) Create a dictionary with names of employees, their salary and access them. [5]
Answer:

num = int (input ("Enter the number of employees whose data to be stored: ") )
count = 1
employee = dict( ) # create an empty dictionary while count <= num:
name = input ("Enter the name of the Employee: ")
salary = int(input("Enter the salary: ") )
count += 1
print ("\n\n EMPLOYEE_NAME_\tSALARY")
for k in employee:

Commonly Made Error:
The student should make use of appropriate syntax

Answering Tip:
The square root of a number is calculated using the formula square root= n**0.5