[go: up one dir, main page]

0% found this document useful (0 votes)
4 views14 pages

Cs - Sample Paper 1

The document is a sample paper for Class 11 Computer Science, consisting of 35 questions divided into five sections, with a total of 70 marks. It includes questions on programming concepts, Python language, and computer fundamentals, along with solutions and explanations. The paper is designed to assess students' understanding of computer science topics and their ability to apply programming skills.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views14 pages

Cs - Sample Paper 1

The document is a sample paper for Class 11 Computer Science, consisting of 35 questions divided into five sections, with a total of 70 marks. It includes questions on programming concepts, Python language, and computer fundamentals, along with solutions and explanations. The paper is designed to assess students' understanding of computer science topics and their ability to apply programming skills.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

CBSE Sample Papers for Class 11 Computer

Science Set 1 with Solutions


Time Allowed: 3 hours
Maximum Marks: 70

Eleventh grade study material


General Instructions:

1. Please check this question paper contains 35 questions.


2. The paper is divided into 5 Sections- A, B, C, D and E.
3. Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
4. Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
5. Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
6. Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
7. Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
8. All programming questions are to be answered using Python Language only.

Section A
[Each question carries 1 mark]

Question 1.
State True or False: [1]
Meaningful content extracted from data is called information.
Answer:
True

Explanation: Meaningful content extracted from data is commonly referred to as information. Data
by itself may not be meaningful or useful until it is processed, organized, and analyzed to provide
insights, context, or knowledge. Once data is transformed into a useful form that can be interpreted
and understood, it is considered information.

Question 2.
Which translator translates one line at a time? [1]
(A) Interpreter
(B) Translator
(C) Simulator
(D) None of these
Answer:
(A) Interpreter

Explanation: An interpreter is a program or software component that translates and executes code
or instructions line by line in real-time.

Question 3.
Which of the following is a way to represent an algorithm? [1]

Sample paper 1 – CS - 2025


(A) Pseudocode
(B) flowchart
(C) None of these
(D) Both (A) & (B)
Answer:
(D) Both (A) & (B)

Explanation: Both pseudocode and flowcharts serve as tools for algorithm design and
representation, and they can be used separately or together, depending on the preference or
requirements of the developer or designer.

Question 4.
The precise step by step instructions given to perform a task are called [1]
(A) Flowchart
(B) algorithm
(C) SDLC
(D) all of these
Answer:
(B) algorithm

Explanation: The precise step-by-step instructions given to perform a task are called an algorithm.
An algorithm is a well-defined set of instructions or rules that describe a sequence of operations to
solve a specific problem or perform a specific task. It provides a clear and systematic approach to
solving a problem, specifying the order and actions required to achieve the desired outcome.

Question 5.
What do we use to define a block of code in the Python language? [1]
(A) Key
(B) Brackets
(C) Indentation
(D) None of these
Answer:
(C) Indentation

Explanation: Python uses indentation to define blocks of code. Indentations are simply spaces or
tabs used as an indicator that is part of the indent code child. Indentations are equivalent to the
curly braces in C, C+ + or Java, which indicate a block of code too.

Question 6.
Study the following statement:
>>>”a”+”bc”
What will be the output of this statement? [1]
(A) a+bc
(B) abc
(C) abc
(D) a
Answer:
(B) abc

Sample paper 1 – CS - 2025


Explanation: In Python, the “+” operator acts as a concatenation operator between two strings. So it
will concatenate/join both the strings, and result in abc.

Question 7.
_____ occurs when each statement of the block does not have the same indentation. [1]
(A) Logical error
(B) Syntax error
(C) Run time error
(D) Indentation error
Answer:
(D) Indentation error

Explanation: An indentation error occurs when each statement of a block does not have the same
level of indentation. In programming languages that use indentation for block structures, such as
Python, consistent indentation is crucial for proper syntax and program execution. Indentation
errors can result in syntax errors or unexpected behavior in the program.

Question 8.
If the value of a = 20 and b = 20, then a+ =b will assign ____ to a. [1]
(A) 40
(B) 30
(C) 20
(D) 10
Answer:
(A) 40

Explanation: a+=b implies a = a+b, which is a = 20+20 = 40. The operator adds RHS to LHS and then
assigns it to the variable on the left side.

Question 9.
Which of the following is not a valid identifier? [1]
(A) Mybook
(B) @book
(C) _book
(D) book23
Answer:
(B) @book

Explanation: An identifier starts with a letter A to Z or a to z or an underscore (_) followed by zero or


more letters, underscores and digits (0 to 9). Python does not allow punctuation characters such as
@, & and % within identifiers.

Question 10.
By default, the values of range () in the for loop start from [1]
(A) -1
(B) 0
(C) 1
(D) 10
Answer:
(B) 0
Sample paper 1 – CS - 2025
Explanation: The range() function returns a sequence of numbers, starting from 0 by default, and
increments by 1 (by default), and ends at a specified number.

Question 11.
What is displayed when we print an empty string? [1]
(A) 0
(B) 1
(C) Name of the string
(D) Blank space
Answer:
(D) Blank space

Explanation: When an empty string is printed, nothing is displayed. The output will be a blank line or
an empty space, depending on the specific programming environment or console settings.
However,’ there will be no visible characters or content displayed as the string is empty.

Question 12.
Write the output of the following code: [1]

>>> L=[ 'w' , 'e' , ' l' , ' c' , 'o' ,'m' , ' e' ]
>>> print (len(L))
(A) 7
(B) 8
(C) 9
(D) None
Answer:
(A) 7

Explanation: The code creates a list L with the elements ‘w’, ‘e’, ‘l’, ‘c’, ‘o’, ‘m’, ‘e’. The len() function
is then used to determine the length of the list, which is the number of elements it contains. In this
case, the list L has 7 elements, so the output of print(len(L)) will be 7.

Question 13.
Which of the following is not a function of the tuple? [1]
(A) update( )
(B) min( )
(C) max( )
(D) count( )
Answer:
(A) update( )

Explanation: The update() function is not a built-in function for tuples in Python. The update()
method is typically associated with some mutable data structures like dictionaries, where it is used
to update or modify the elements of the data structure. However, tuples in Python are immutable,
meaning their elements cannot be modified or updated once the tuple is created. Therefore, the
update() function does not apply to tuples.

Sample paper 1 – CS - 2025


Question 14.
sorted() can be used to sort the following: [1]
(A) Keys in a dictionary
(B) Dictionary according to the values
(C) Lists
(D) All of these
Answer:
(D) All of these

Explanation: The sorted() function in Python can be used to sort various types of data structures
and iterables, including:

(A) Keys in a dictionary: By passing the dictionary keys as the argument to sorted(), you can sort
and return a new list containing the keys in sorted order.
(B) Dictionary according to the values: You can sort a dictionary based on its values by using the
sorted() function with a custom key argument or by utilizing the itemgetter() function from the
operator module.
(C) Lists: Sorting a list is one of the most common use cases for the sorted() function. It returns a
new sorted list without modifying the original list.
(D) All of these.

Question 15.
Exploring appropriate and ethical behaviors related to online environments and digital media [1]
(A) Cyber ethics
(B) Cyber security
(C) Cyber safety
(D) Cyber law
Answer:
(A) Cyber ethics

Explanation: It involves understanding and adhering to principles such as respect for privacy,
intellectual property rights, digital citizenship, online etiquette, and responsible online behavior.

Question 16.
An antivirus software protects against [1]
(A) VIRUS attack
(B) Phishing and pharming
(C) Both (A) & (B)
(D) None of these
Answer:
(C) Both (A) & (B)

Explanation: Antivirus software, originally designed to detect and remove viruses from computers,
can also protect against a wide variety of threats, including other types of malicious software, such
as keyloggers, browser hijackers, Trojan horses, worms, rootkits, spyware, adware, botnets and
ransomware.

Q17 and 18 are ASSERTION AND REASONING based questions. Mark the correct choice as [1]
(A) Both (A) and (R) are true and (R) is the correct explanation of (A)
(B) Both (A) and (R) are true but (R) is not the correct explanation of (A)
Sample paper 1 – CS - 2025
(C) (A) is true, but (R) is false
(D) (A) is false, but (R) is true

Question 17.
Assertion (A): The pow() function in Python can be used to calculate the square root of a number.
[1]
Reasoning (R): The pow() function can raise a number to a fractional power, which can be used to
calculate square roots.
Answer:
(A) Both (A) and (R) are true and (R) is the correct explanation of (A)

Explanation: The assertion is true as the pow() function can also calculate the square root by
raising the number to the power of 0.5, which is essentially a square root of any number. Hence, the
reasoning is also true and justified, as by raising a number to fractional power, we can get square
root, e.g., pow(16, 0.5) = 4.0.

Question 18.
Assertion (A): Python modules are stored in files with a “.py” extension, and they allow you to
logically organize your Python code. [1]
Reasoning (R): The “.py” extension is commonly used for Python code files, and modules provide a
way to organize code by grouping related functions, classes, and variables together.
Answer:
(A) Both (A) and (R) are true and (R) is the correct explanation of (A)

Explanation: The assertion is true as the pow() function can also calculate the square root by
raising the number to the power of 0.5, which is essentially a square root of any number. Hence, the
reasoning is also true and justified, as by raising a number to fractional power, we can get square
root, e.g., pow(16, 0.5) = 4.0.

Section B
(Each question carries 2 marks)

Question 19.
Define [2]
(i) POST
(ii) PROM

OR

(i) What do you mean by registers?


(ii) Why is the Fetch-Execute cycle used inside a computer?
Answer:
(i) POST or Power On Self-Test is an automated diagnostic process that occurs when a computer
system is powered on. The POST is performed by the computer’s firmware (typically the BIOS or
UEFI) and is designed to check the hardware components and ensure they are functioning properly.
If no error is found, the computer proceeds to boot, else the error message is displayed.

(ii) PROM stands for Programmable Read Only Memory. It is a control memory in which stored
contents can be altered even after they have been set before.

Sample paper 1 – CS - 2025


OR

(i) It is a small amount of very fast memory that is built into the CPU.
(ii) Fetch – Execute Cycle is used to execute a program.

Question 20.
Define Operating system. Give the names of any three operating systems. [2]
Answer:
An Operating System is defined as a collection of programs that coordinates the operations of
computer hardware and software. It acts as a bridge or interface between man and machine. An
Operating system is a system software which is mandatory for all computer systems to operate.
Some commonly used operating systems are Windows, DOS, Android, etc.

Question 21.
Draw a flowchart to calculate the sum of two numbers. [2]

OR

Draw a flowchart to convert temperature from Fahrenheit to Celsius.


Answer:

Question 22.
What will be the output of the following statements when inputs are a = 30, b = 20, c = 30? [2]

print(a<b)
Sample paper 1 – CS - 2025
print(b<=c)
print(a<b<=c)
Answer:
False
True
False

Explanation for iii.: This expression combines two comparisons. It checks if a is less than b and if b
is less than or equal to c. Given that a = 30, b = 20, and c = 30, the first comparison a < b evaluates
to False as we established before. In Python, chained comparisons like a < b < = c are evaluated
from left to right. In this case, since the first comparison is False, the expression will evaluate to
False without evaluating the second comparison.

Question 23.
What do you mean by debugging? [2]

OR

What do you mean by runtime error? [2]


Answer:
Debugging is the process of detecting and removing existing and potential errors in a program code
that can cause it to behave unexpectedly or crash.

OR

Runtime errors are those errors which occur during the execution of the program. It occurs when
statements are correct syntactically but the interpreter cannot execute them correctly, e.g., divide
by zero error.

Question 24.
Write a short note on while loop. [2]

OR

Rewrite the code after correcting the errors.

a = int ["Enter a number for a:"]


for in range (1, 15)
if a = b
print "Equal numbers"
else
print "Non equal numbers"
Answer:
While loop is used to repeat a set of instructions till the test condition becomes false. The test
condition for the execution of the loop is checked after every ‘ iteration, else statement is executed
when the condition becomes false. It checks the test condition, before starting to execute the set of
instructions enclosed.
Sample paper 1 – CS - 2025
While the test condition remains true, it keeps on repeating the set of instructions, and after every
iteration, checks the condition again. As soon as the condition becomes false, it exits the loop, and
continues with the normal flow of a program.
Syntax
while <test-condition>:
#statement 1
#statement 2
……………….
#statement 3
#code outside the while loop

OR

a = int (input ("Enter a number for a: ") )


for b in range (1, 15) :
if (a==b):
print ("Equal numbers")
else:
print ("Non equal numbers")
Question 25.
Explain types of digital footprint. [2]
Answer:
A digital footprint refers to the traces and information that an individual or entity leaves behind
while using digital technologies and the internet. These footprints can be classified into various
types, including:

a. Active Digital Footprint: This type of digital footprint refers to the information intentionally
shared by individuals online. It includes content such as social media posts, blog articles,
comments on websites, photos or videos uploaded, and any other content created and shared
actively.

b. Passive Digital Footprint: Passive digital footprints are created through online activities that are
not consciously shared but are collected by others or generated automatically. It includes data
collected by websites and online services, such as IP addresses, cookies, browsing history, search
queries, and online purchases.

Section C
[Each question carries 3 marks]

Question 26.
Write a pseudocode to find the largest of the three numbers, taken as input from user. [3]
Answer:

Step 1: SET largest = 0


Step 2: INPUT a,b,c
Step 3: If (a>b) AND(a>c)
largest = a
ELSE IF(c>b) AND(c>a)
largest = c
ELSE IF(b>a) AND(b>c)
largest = b
Sample paper 1 – CS - 2025
ELSE
print "All are equal"
Step 4: PRINT largest
Question 27.
If water boils at 100 degrees C and freezes at 0 degree C, write a program to find out what is the
boiling point and freezing point of water on the Fahrenheit scale.
[Use formula for conversion: T(°F) = T(°C) × 9/5 + 32] [3]

OR

Write a python program to convert 5000 secs to hr:mm:ss format. Print the calculated time.
Answer:

boil = 100 # boiling point in degree C


freez = 0 # freezing point in degree C
boilF = boil * (9 / 5) + 32 # boiling point in degree F
freezF = freez * (9 / 5) + 32 # freezing point in degree F
print('Boiling point in degree F: ',boilF)
print('Freezing point in degree F: ',freezF)
OR

secs = 5000
mm = secs//60 #converted into minutes, quotient will be minutes
ss = secs%60 #The remainder obtained while converting to minutes, will be
expressed in seconds
hr = mm//60 #Similarly converting minutes to hours
mm = mm%60 #Fractional/Remainder will be the remaining minutes
print ('hr :mm: ss', ' hr' , ':' 'mm' , ' :' , 'ss')
Question 28.
Suppose you are collecting money for something. You need ₹ 200 in all. You ask your parents,
uncles and aunts as well as grandparents. Different people may give either ₹ 10, ₹ 20 or even ₹ 50.
You will collect till the total becomes atleast ₹ 200. Write the algorithm. [3]
Answer:

SET totalMoney = 0
WHILE totalMoney < 200
DO INPUT money
totalMoney = totalMoney + money
END LOOP
Question 29.
What do you understand by Net Etiquettes? Explain any two such Etiquettes. [3]
Answer:
Net etiquettes refer to the proper manners and behaviour we need to exhibit while being online.
These include:

(i) No copyright violation: We should not use copyrighted materials without the permission of the
creator or owner. We should give proper credit to owners / creators of open source content when
using them.

Sample paper 1 – CS - 2025


(ii) Avoid cyber bullying: Avoid any insulting, degrading or intimidating online behaviour like
repeated posting of rumours, giving threats online, posting the victim’s personal information, or
comments aimed to publicly ridicule a victim.

Question 30.
List and name any three types of cyber-crimes. [3]
Answer:
Types of Cyber Crimes
[Note: You can choose and write any 3, more given for your reference]

General

 Hacking, spyware, phishing, harming


 Sending computer viruses & worms to invade computers
 Creating bots, Trojan horses, zombie machines Nuisances (usually non-violent activities)
 Sending spam
 Changing web page text and images
 Redirecting websites to unsafe websites Personal Identity Theft (using someone else’s name
or credit)
 Phishing for private information, passwords, code numbers
 Making unauthorized purchases with stolen credit cards or IDs
 Destroying personal reputation
 Damaging personal credit ratings Theft of Intellectual Property (stealing ideas or creations of
others)
 Downloading copyrighted music & videos
 Plagiarism, cheating
 Software piracy Physical or Mental Damage
 Cyber bullying, harassment
 Cyberstalking
 Sexual exploitation of minors, child pornography

Section D
[Each question carries 4 marks]

Question 31.
Consider the following Python code snippet: [4]

input_list = [1, 2, 3, 4, 4, 5, 6, 6, 7, 8, 9, 9, 1o]


elements - []
for element in input_list:
if input_list.count(element) == 1:
elements.append(element)
print (elements)
(i) Explain the purpose of the ‘fund’ function. (1 mark)
(ii) What is the role of the ‘for’ loop in the ‘fund’ function? (1 mark)
(iii) Describe the conditions in the ‘if’ statement within the ‘for’ loop. (1 mark)
(iv) Write the output of the code snippet. (1 mark)
Answer:
i. The purpose of the ‘ fund’ function is to find and return the unique elements from the given input
list.
ii. The for’ loop in the ‘fund’ function iterates over each element in the input list, starting from 1st
Sample paper 1 – CS - 2025
element and till the last element.
iii. The ‘if’ statement checks if the count of the current element in the input list is equal to 1. This
condition ensures that the element appears only once in the list, making it unique.
iv. The output of the code snippet will be:’ The unique elements are: [1, 2, 3, 5, 7, 8, 10]’. It displays
the unique elements found in the ‘numbers’ list.

Question 32.
Create a dictionary, and count the frequency of each character, i.e., the number of times each
character appears. [4] Answer:

freq = { }
str = input("Enter a string: ")
for i in str:
if i in freq:
freq[i] + = 1
else:
freq[i] = 1
print("Frequency of each character:\n ",freq)
Section E
[Each question carries 5 marks]

Question 33.
Write a program to find the grade of a student when grades are allocated as given in the table
below: [5]

Percentage of Marks Grade

Above 90% A

80% to 90% B

70% to 80% C

60% to 70% D

Below 60% E

Percentage of the marks obtained by the student is input to the program.


(i) Take the input from user, and store it in a variable. Convert to int accordingly.
(ii) Apply the given grade slabs, and print the grade of the student.
Answer:

i. percentage = int (input (‘Enter your percentage: ‘))

ii.

if (percentage > 90) : print('A')


elif (percentage > 80 and percentage <= 90) : print('B')
elif (percentage > 70 and percentage <= 80): print('C')
elif (percentage > 60 and percentage <= 70) : print('D')

Sample paper 1 – CS - 2025


else: print('E')

Question 34.
Given a set of 100 integers, draw a flowchart to [5]
(i) count the number of odd and even integers.
(ii) Also find the product of the odd integers and the sum of even integers, in the same flowchart.

OR

(i) What are following pseudocode keywords used for?


(A) compute
(B) while
(C) if/else
(D) display
(ii) Write pseudocode to find the sum of first n natural numbers. Accept ‘n’ from the user.
Answer:

Or

(i) (a) COMPUTE: To show the calculations to be done.


(b) WHILE: To show certain steps that are to be repeated until a condition is met.
(c) IF/ELSE: To execute some steps if a condition is true, else execute some other steps.
(d) DISPLAY: To show the output.

(ii) Step 1 SET sum=0, no=1


Step 2 INPUT n
Step 3 While no < = n REPEAT STEPS 4 to 5
Step 4 sum=sum+no
Step 5 no=no+1
Step 6 PRINT sum
Sample paper 1 – CS - 2025
Question 35.
Mention 5 negatives impact of technology on society? [5]
Answer:
The negative impacts of technology on society are: [Note: Write any 5 points only. Here more are
given for reference]

Increased pollution: Advancement in technology has led to more and more manufacturing units and
hence to environmental pollution.

Lack of social skills: the Frequency of interacting personally has been reduced much thus kids and
teenagers are deprived of basic, social manner Poor sleep Habits: Endorsing online activities have
affected the sleeping pattern of people.

Loneliness/Isolation: Engaged in our gadgets we get isolated from the world around us even if we
are in a crowded place.

Addiction: Addiction to technology is becoming stronger every passing day, and therefore very
difficult to live without.

Obesity: Sitting on social media and dependence on technology for minimal tasks like grocery
shopping has led to obesity, Kids don’t feel a need to go out and play with friends when they can sit
back at home and play online games with their online friends

Depression: Dependence on technology and less interaction with fellow human beings can lead to
depression.

Lack of Privacy: People are opening up their private space by giving their information on other sites
thus giving rise to criminal activities.

Overshare on social media has led to the tendency of crossing social boundaries and cyberstalking
has become common.

Children at much younger age get an exposure to online platforms, and social-media which might
bring online hate and shape the child’s mind accordingly This also subjects them to more sexual/
prohibited engagement online.

Lesser attention span: Constant newsfeed, getting multiple messages in a minute, and switching
application too frequently has led to our mind being programmed for a lesser attention span on a
particular task. Hence remembering and recalling are becoming tough tasks.

Social Violence & Hatred: People are loosing empathies due to lack of knowledge about social
ethics and hence social violence is increasing.

Eyesight & Hearing Loss: Using earphones, or headphones could cause people to reduce their
hearing after some time. Similarly viewing display/ screen of gadgets for prolonged period of time
results in vision loss.

Sample paper 1 – CS - 2025

You might also like