Dummy ANS Key-Class-11
Dummy ANS Key-Class-11
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]
(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
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
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
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' ]
(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.
Choose the correct command, to keep the cursor on the same line, after printing both values on the
same line.
(A) print(a,b)
(B) print(a,b, end=””)
(C) print(a,b, end=”$”)
(D) print(a)print(b)
Answer:
(B) print(a,b, end=””)
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)
(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
(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.
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)
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
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
if a = b
else
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.
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
else:
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:
largest = a
largest = c
largest = b
ELSE
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:
OR
secs = 5000
ss = secs%60 #The remainder obtained while converting to minutes, will be expressed in seconds
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
DO INPUT 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.
(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
Creating bots, Trojan horses, zombie machines Nuisances (usually non-violent activities)
Sending spam
Redirecting websites to unsafe websites Personal Identity Theft (using someone else’s name
or credit)
Damaging personal credit ratings Theft of Intellectual Property (stealing ideas or creations of
others)
Plagiarism, cheating
Cyberstalking
Section D
[Each question carries 4 marks]
Question 31.
Consider the following Python code snippet: [4]
elements - []
elements.append(element)
print (elements)
Question 32.
Write Python program that accepts marks in 5 subjects and outputs average marks.
Solution:
m1 = int(input("Enter first subject marks: "))
m2 = int(input("Enter second subject marks: "))
m3 = int(input("Enter third subject marks: "))
m4 = int(input("Enter fourth subject marks: "))
m5 = int(input("Enter fifth subject marks: "))
avg = (m1 + m2+ m3+ m4 + m5) / 5;
print("Average Marks =", avg)
Output:
Enter first subject marks: 65
Enter second subject marks: 78
Enter third subject marks: 79
Enter fourth subject marks: 80
Enter fifth subject marks: 85
Average Marks = 77.4
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]
ii.
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
Or
Question 35.
(i) Predict the output of the following code :
days = int (input ("Input days : ")) * 3600 * 24
hours = int(input("Input hours: ")) * 3600
minutes = int(input("Input minutes: ")) * 60
seconds = int(input("Input seconds: "))
time = days + hours + minutes + seconds
print("Total number of seconds", time)
If the input given is in this order : 1, 2, 3, 4
Output
Input days : 1
Input hours: 2
Input minutes: 3
Input seconds: 4
Total number of seconds 93784
(ii) The id( ) can be used to get the memory address of a variable. Consider the adjacent code
and tell if the id( ) functions will return the same value or not(as the value to be printed via
print() ) ? Why ?
[There are four print() function statements that are printing id of variable num in the code
shown on the right.
num = 13
print( id(num) )
num = num + 3
print( id(num) )
num = num - 3
print( id(num) )
num = "Hello"
print( id(num) )
Answer
num = 13
print( id(num) ) # print 1
num = num + 3
print( id(num) ) # print 2
num = num - 3
print( id(num) ) # print 3
num = "Hello"
print( id(num) ) # print 4
For the print statements commented as print 1 and print 3 above, the id() function will return
the same value. For print 2 and print 4, the value returned by id() function will be different.
The reason is that for both print 1 and print 3 statements the value of num is the same which
is 13. So id(num) gives the address of the memory location which contains 13 in the front-
loaded dataspace.