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

CBSE Sample Papers for Class 11 Computer Science Set 3 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) Ridhima today studied about Boolean Algebra. She searched about it on the net and got to know two more names for this algebra, can you name them? [2]
Answer:
Binary Algebra and Switching Algebra

(b) The + = operator is used to add the right hand side value to the left hand side value. [1]
(True/False)
Answer:
False

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

(c) Choose the correct syntax for printing values in the same line. [1]
(A) print(a,b)
(B) print(a, end=””,b)
(C) print (a,end=”$”,b)
(D) print(a)print(b)
Answer:
(B) print(a, end=””,b)

(d) If the value of a = 20 and b = 20, then a+ =b will be [1]
(A) 40
(B) 30
(C) 20
(D) 10
Answer:
(A) 40

Explanation:
Operation’+ =’ means adds the value of the right operand to a variable and assigns the result to the variable, statement will execused as a = a + b ⇒ a = 20 + 20 ⇒ 40

(e) Which of these statements allows exactly two set of statements ? [1]
(A) if
(B) if-else
(C) if-elif-else
(D) all of these
Answer:
(B) if-else

Explanation:
In the if-else statement, allows exactly Two set of statements – one statement for True condition and second for false statement.

(f) Convert the while loop into for loop, [2]
num = 7
while (num < 21):
print (num * 2)
num += 3
Answer:
for num in range (7, 21, 3):
print (num * 2)

(g) What are the two ways used by anti-spam software to get rid of spam? [2]
Answer:
Two methods used by anti-spam software to get rid of spam are:
(i) Sender filtering: This method allows to send list of messages which are approved by sender to reach your inbox.
(ii) Keyword filtering: This method filters out email messages that contain certain keywords or phrases which are defined by us.

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

(h) An algorithm is a procedure used for solving a problem or performing a computation. Algorithms act as an exact list of instructions that conduct specified actions step by step in either hardware- or software-based routines. Algorithms are widely used throughout all areas of IT. In mathematics and computer science, an algorithm usually refers to a small procedure that solves a recurrent problem. Algorithms are also used as specifications for performing data processing and play a major role in automated systems.
1. What is an algorithm?
(A) A flowchart
(B) A flowchart or pseudocode
(C) A decision
(D) Step by step instructions used to solve a problem
Answer:
(D) Step by step instructions used to solve a problem

Explanation:
Every problem solution starts with a plan. This plan is called an algorithm. An algorithm is a plan to solve a problem, and there are many ways to write it.

2. What are the three algorithm constructions?
(A) Input, Output, Process
(B) Sequence, Selection, Repeat
(C) Input/Output, Decision, Repeat
(D) Loop, Input/Output, Process
Answer:
(B) Sequence, Selection, Repeat

3. Which of the following is incorrect? Algorithms can be represented:
(A) as pseudo codes
(B) as syntax
(C) as programs
(D) as flowcharts
Answer:
(B) as syntax

Explanation:
Representation of algorithms:

  • As programs
  • As flowcharts
  • As pseudo codes.

4. When an algorithm is written in the form of a programming language, it becomes a ______________
(A) Flowchart
(B) Program
(C) Pseudo code
(D) Syntax
Answer:
(B) Program

Explanation:
An algorithm becomes a program when it is written in the form of a programming language. Thus, any program is an algorithm.

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

Question 2.
(a) The use of else is optional with if statement. [1]
(True/ False)
Answer:
True

(b) Lists are indexed using an ……………….. [1]
Answer:
Integer

(c) What are the differences between lists and strings? [2]
OR
Write a Python program to read a number if the number is even print half the number otherwise print the next number. End your program by printing “Thank You”. A
Answer:
The differences can be stated as under:

  • Lists are mutable while strings are immutable.
  • Lists are written enclosed in square brackets while strings are written enclosed in quotes.

OR

num = int (input ("Enter a number"))
if (num%2==0):
print ("The given number is even")
print ("The half number is ", num/2)
else:
print ("The number is odd")
print ("The next number is", num + 1 )
print ("Thank You!")

(d) Jyotika just began learning Python. She wrote a program with two variables var-2 and lvar. is she using the variable names right, give reasons and also suggest correct variable names if these are incorrect. [4]
Answer:
No, variable names can’t contain special symbols otherv than _(underscore) and $. Also variable names can’t begin with a digit. Correct variables would be var_2 and varl.

(e) Write a program that reads a line, then counts words and displays how many words are there in the line. [4]
Answer:

line = input ("Enter a line:") [4]
x=line.split( )
cnt=0
for i in x:
cnt=cnt+1
print cnt

Question 3.
(a) Anubhav is writing a Python program. He has to use the following expression to generate the output:
a = \(\frac{-b+\sqrt{\left(b^2-4 a c\right)}}{2 a}\) help him write this expression in Python. [1]
Answer:
a=(-b+math.sqrt(b**b-4*a*c))/(2*a)

(b) How is sound input into a computer ? [2]
Answer:
A user can input sound into a computer through a special device called microphone or mic. It converts the sound received into digitized form. For a microphone to work on a computer, the computer should have a sound card.

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

(c) Write two ways each in which the following affect a computer system. [4]
(i) VIRUS
(ii) Spyware
Answer:
(i) VIRUS

  • A VIRUS infects system files thus making a system to behave unexpectedly.
  • A VIRUS tends to slow down the system by executing itself in the background.

(ii) Spyware

  • Spyware may play with the system settings such as icon positioning or web browser’s home page.
  • A spyware robs off a system of its speed or internet access efficiency.

Question 4.
(a) Python compares strings on the basis of ……………………. values. [1]
Answer:
ASCII

(b) What are the differences between lists and dictionaries? [2]
Answer:
The difference between lists and dictionaries are stated below: [2]

  • In lists, the elements are written enclosed within [ ] while in dictionaries, key-value pairs are written enclosed within { }.
  • Keys used in dictionaries can be of any data type but index used in lists are always integers

(c) Write a program to find whether a person is a senior citizen or not. [4]
OR
What are loop control elements for a while loop in python?
Answer:

byear = int (input ("Enter the year of birth ") )
cyear = int (input ("Enter the current year: ") )
age = cyear - byear
print ("Age is:" , age)
if age >= 60
print ("Senior Citizen")
else:
print ("Not Senior Citizen")

OR

The elements of a loop that control and govern its execution are called loop control elements.
These are four in number namely:

  1. Initialization expression gives an initial value to the loop variable. This is outside the loop.
  2. Test expression decides whether the loop is executed or not.
  3. Body of the loop consists of the statements that are executed iteratively till the test expression remains true.
  4. Update expression is a statement that changes the value of loop variable. This is given within the body of the loop.

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

Question 5.
(a) Draw a flowchart to calculate factorial of a number. [3]
Answer:
CBSE Sample Papers for Class 11 Computer Science Set 3 with Solutions 1

Commonly Made Error:
Students must make use of accurate symbol and shape based on the actions.

Answering Tip:
A student must remember that, the Factorial of a natural number, is multiplication of all the numbers smaller than or equal to n.. Based on this, the flow chart should be drawn.

(b) Do as directed: ip] [4]
(i) Convert the Decimal number 781 to its Binary equivalent.
(ii) Convert Binary number 101101.001 to its decimal equivalent
(iii) Convert Octal number 321.7 into its Binary equivalent
(iv) convert hexadecimal number AE into its binary equivalent.
OR
Define the ASCII with its sections.
Answer:
(i)
CBSE Sample Papers for Class 11 Computer Science Set 3 with Solutions 2

(ii) 1 0 11 0 1. 0 0 1, to decimal
= 1 × 25 + 0 × 24 + 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20 + 0 × \(\frac{1}{2}\) + 0 × \(\frac{1}{2^2}\) + 1 × \(\frac{1}{2^3}\)
= 32 + 0 + 8 + 4 + 0 + 1 + 1 × \(\frac{1}{8}\)
= 45.125
(101101.001)2 = (45.125)10

(iii) 321.78 to Binary
Use chart

3 2 1 7
011 010 001 111

321.78 = (11010001.111)2

(iv) AE16 to binary

A(10) E(14)
1010 1110

AE16 = 10101110

OR

ASCII stands for American standard code for information interchange. The ASCII code associates an integers value for each symbol in the character set such as letter digits punctuation marks special character and control characters. ASCII decimal number is created from binary which is the language of all computers. ASCII was first developed and published in 1963 by the X3 committee a part of the ASA (American standard Association)
ASCII Sections: The ASCII table is divided into three different sections as
(i) Non -printable: It represent the system codes between 0 and 31
(ii) Lower ASCII: It represent the code between 32 and 127. This table originates from the American system, which worked on 7- bits character tables.
(iii) Higher ASCII: Its represent the codes between -28 and 255 .Foreign letters are also placed in this
section. This portion is programmable character which are based on language of operating system or programs that users are using.

Commonly Made Error:
A student must remember that, conversions must be done carefully depending on the type given.

Answering Tip:
To convert decimal integer to binary form. Divide the number by 2 by writing the remainder 0 and 1 at RHS. 1 Continue the process of division until the quotient is 0.

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

Question 6.
(a) How will you accept input from the console? [2]
Answer:
A program needs to interact with end user to accomplish the desired task. This is done by using Input- Output facility. Input refers to the data entered by the user (end user) of the program. While writing an algorithm or program , getting input from user is defined using the Built-in function, input))
Syntax : variable that_holds_the_value = input (“<message to be displayed>”) –
Examples : school = input(“Write the name of your school:”)
num = input(“Enter any number : “)

(b) Siddhant wrote the following line of code range (5, 0, -2). the sequence generated here will be ……………? name a scenario where Siddhant can use this piece of code. [2]
Answer:
(5, 3, 1)
This can be used to print odd numbers starting from 5 in reverse order.

(c) Write the program to calculate area and circumference of a circle and display the results [2]
Answer:
dia = float (input (” Please enter the diameter of a circle:”)) [2]
pi = 3.14
Area = pi * (dia/2) * (dia/2) # calculate the area
Circumference = pi * dia # calculate the circumference
print (“Area of a circle is:”, Area)
print(“Circumference of a circle is:”, Circumference)

Question 7.
(a) Given String strl=”Honesty is the best policy” [1]
What will be the output of following code?
L=len (strl)
print(L)
(A) 22
(B) 26
(C) 25
(D) 24
Answer:
(B) 26

(b) Write some rules you must follow while using social media sites. [4]
Answer:
The rules that should be followed while using social media are as follows.

  • Test your post for publicity test: Post only those messages that are acceptable for face to face conversation or any other medium.
  • Respect other’s sentiments: Be considerate about other people’s religious and political opinions.
  • Mind your words: Never use long or abusive words or personal insults obscenity.
  • Maintain confidentiality: Never provide your personal information like your home address or telephone number online. Create separate email address that is to be used only with social media sites. Never share your location online.

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

Question 8.
A digital footprint is a trail of data you create while using the Internet. It includes the websites you visit, emails you send, and information you submit to online services.
A “passive digital footprint” is a data trail you unintentionally leave online. An “active digital footprint” includes data that you intentionally submit online. Sending an email contributes to your active digital footprint, since you expect the data be seen and/or saved by another person. The more email you send, the more your digital footprint grows. Since most people save their email online, the messages you send can easily remain online for several years or more. [5]
(i) Which of the following type of digital footprints created by the user intentionally with their active consent
(A) Active digital footprint
(B) Passive digital footprint
(C) Massive digital footprint
(D) Interactive digital footprint
Answer:
(A) Active digital footprint

Explanation:
An active digital footprint is where the user has deliberately shared information about themselves either by using social media sites or by using websites.

(ii) Which of the following digital footprints can be created without the user’s consent?
(A) Active digital footprint
(B) Passive digital footprint
(C) Massive digital footprint
(D) Interactive digital footprint
Answer:
(B) Passive digital footprint

Explanation:
A passive digital footprint is a data trail you unintentionally leave online.

(iii) The digital footprint can be saved in which of the following locations?
(A) Download folder
(B) User account
(C) Browser settings and web server
(D) Google Drive
Answer:
(C) Browser settings and web server

Explanation:
There are two main storages of digital footprints:
(A) Browser Settings: The digital footprints can be saved in browser history, cookies, password, auto fill data etc.
(B) Web Server and Database: Every website has its own database. When the user enters data and fills it up to them it can be saved in the database.

(iv) Which of the following action can be taken to keep the digital footprint clean?
(A) Search what information you leftover social media and the internet.
(B) Be smart and sensible while using any website, sending an email or opening a link.
(C) Control visibility settings from the browser or website/app settings.
(D) Remove any private details like mobile number, school, college name, address, photos, etc.
Answer:
(D) Remove any private details like mobile number, school, college name, address, photos, etc.

Explanation:
The user’s should restrain from over sharing digital footprint and be more vigilant in its usage as there are possibility of risk of cyber bullying, identity theft, humiliation and embarrassment beside violation of privacy.

(v) The data taken from a digital footprint can be used for
(A) Hacking
(B) Only for feedback
(C) Showing relevant ads
(D) All of these
OR
What is digital footprint? Explain its types in detail.
Answer:
(D) All of these
Explanation:
Digital footprint means the impressions left on the browsers after using the internet.

OR

Whatever a person does on Internet creates his image or we can say left a shadow behind of that activity and all these activities shadow creates your identity, this identity is called digital footprint. Digital footprint is nothing but the record of what a person do online.
Digital footprint includes email you sent, information you shared, websites you visit and the activities you took * part online.
Digital footprint is of two types
1. Active digital footprint: When a user knowingly share the personal data in order to share information about the user by means of social networking sites or other websites then it is known as active digital footprint e.g. when user makes a comment or post something on social media.

2. Passive digital footprint: When the personal data of the user is collected without letting him know or collection of personal data of user without the permission of him is known as passive digital footprint, e.g. when user visits any website then website traces his physical location using user’s device IP address.

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

Question 9.
(a) What is the difference between 7′ and 7/’ operators? [2]
(b) Write a program to accept an alphabet from the user and display whether it is a vowel or a consonant
Answer:
(a) The 7′ operator results in the complete division when a number is divided by another number,
The ‘//’ operator refers to as floor division which results in the quotient of the division when a number is divided by other number.

(b) while True: [4]
alpha = input (“Enter an alphabet:”)
if (alpha == ‘a’ or alpha = ‘A’):
print (alpha, “is a vowel” )
eiif (alpha == ‘e’ or alpha = ‘E’ )
print (alpha, “is a vowel” )
elif (alpha == ‘i’ or alpha = ‘I’ )
print (alpha, “is a vowel” )
elif (alpha == ‘o’ or alpha = ‘0’ )
print (alpha, “is a vowel” )
elif (alpha == ‘u’ or alpha = ‘U’ )
print (alpha, “is a vowel”! )
else:
print (alpha, “is a consonant”)

Question 10.
What is the full form of ASCII? [1]
Answer:
American standard code for information interchange.