0% found this document useful (0 votes)
24 views5 pages

Class 11 Informatics Practices Exam 2022

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)
24 views5 pages

Class 11 Informatics Practices Exam 2022

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

PT-

PT-2/HALF YEARLY EXAMINATION, 2022-


2022-23
INFORMATICS PRACTICES
Time - 7:15 AM to 10:20 AM Class - XI M.M. : 70
Date – 07.09.2022 (Wednesday)
Name of the student _________________________________________________ Section _____
General Instructions:
• Please read the instructions carefully.
• This Question Paper consists of 36 questions in
four sections – Section A, B, C & D.
• Section A contains 11 MCQ type questions of 1
mark and 5 questions of 2 marks each.
• Section B contains 13 questions of 2 marks each.
• Section C contains 5 Short Answer type questions
of 3 marks each.
• Section D contains 2 questions of 4 marks.
• All questions of a particular section must be
attempted in the correct order.

SECTION- A
Multiple Choice Questions. (1x11=11)
Q.1 Which among the following acts as an interface between a user and computer hardware?
a) Interpreter b) OS c) Syntax d) Language
Q.2 A disk defragmenter is an example of:
a) Application Software b) System Software c) Utility program d) None of these
Q.3 Flash memory is a type of __________ memory.
a) Primary b) RAM c) Secondary d) Hard disk
Q.4 Component of CPU which is responsible for comparing the contents of two pieces of data is
a) ALU b) CU c) Memory d) Register
Q.5 You don’t have to pay for Python and you can view its source code too. It means Python is
a) Free and open source b) Freeware c) Open source d) Shareware
Q.6 Which one of these is floor division?
a) / b) // c) % d) None of these
Q.7 Which of the following is a valid identifier?
a) My name b) My-name c) Myname d) [Link]
Q.8 Which of the following statements will make a repetition construct?
a) if b) If-else c) for d) None of these
Q.9 Which of the following is not a valid loop in Python?
a) for b) do-while c) while d) if-else
PT-2 / HALF YEARLY EXAM | INFORMATICS PRACTICES | CLASS 11 | 2022-23 | PRINTED Q 29 PRINTED PAGES 5 | PAGE# 1
Q.10 Which of the following can add a list of elements to a list?
a) add() b) append() c) extend() d) None of these
Q.11 To find the last element of list namely ‘smiles’ in Python, _____ will be used.
a) smiles[-1] b) smiles[0] c) smiles[pos] d) smiles[:-1]
Multiple Choice questions. (2x5=10 marks)
Q.12 What is the value of the expression 10 + 3 ** 3 * 2?
a) 28 b) 739 c) 829 d) 64
Q.13 What will be the result of the expression 10 or 0?
a) 0 b) 1 c) 10 d) 1.0
Q.14 What will be the output after execution of the following code?
a=11
b=5
if (a%b==0):
print ( "Greater")
if (a//b==0):
print ( "Example")
else:
print ("Sooo Sorry")
a) Sooo Sorry b) Great c) Example d) Great Example
Q.15 What does the following Python program display?
x=3
if x == 8:
print ("Am I here?", end = '')
elif x == 3:
print("Or here?", end = "")
else:
print ("Or over here?")
a) Am I here? b) Or here?
c) Am I here? Or here? d) Or here? Or over here?
Q.16 Given a list L = [10, 20, 30, 40, 50, 60, 70], what would L[-3: 99] return?
a) [20, 30, 40] b) [30, 40, 50] c) [40, 50, 60] d) [50, 60, 70]

PT-2 / HALF YEARLY EXAM | INFORMATICS PRACTICES | CLASS 11 | 2022-23 | PRINTED Q 29 PRINTED PAGES 5 | PAGE# 2
SECTION - B
Objective Questions: [2x7=14 marks]
Q.17 Predict the output if the input is 6, 11 & 9:
x=int(input(“Enter number 1 : “))
y=int(input(“Enter number 2 : “))
z=int(input(“Enter number 3 : “))
print(“Original numbers : “, x, y,z)
x,y,z=y,z,x
print(“After swapping :”,x,y,z)
Q.18 Find the error in following code fragment : (The input entered is XI)
c=int(input(“Enter your class: “))
print(“Your class is “,c)
Q.19 What letters will be printed if the user enters 0 for a and 0 for b?
a = int(input("Enter an integer: "))
b = int(input("Enter an integer: "))
if a <= 0:
b=b+1
else:
a=a+1
if a > 0 and b > 0:
print("W")
elif a > 0:
print("X")
if b > 0:
print("Y")
else:
print("Z")
Q.20 for i in range(10, 5, -3):
print (i)
How many times will this loop run?

PT-2 / HALF YEARLY EXAM | INFORMATICS PRACTICES | CLASS 11 | 2022-23 | PRINTED Q 29 PRINTED PAGES 5 | PAGE# 3
Q.21 What is the output produced when this code executes?
a=0
for i in range(4,8):
if i % 2 == 0:
a=a+i
print (a)
Q.22 Given a list L = [10, 20, 30, 40, 50, 60, 70], what would L[-4:-1] return?
Q.23 What gets printed?
names = ["Hasan", "Balwant”, ‘Sean’, ‘Dia']
print(names[-1][-1])
Subjective Questions: [2x6=12]
Q.24 What is the difference between an interpreter and a compiler?
Q.25 What is Cache memory? Why is it considered crucial for a microprocessor’s performance?
Q.26 Describe the terms free software and open source software.
Q.27 What is the difference between interactive mode and script mode in Python?
Q.28 The following code is not giving desired output. We want to input value as 20 and obtain
output as 40. Give reason.
Number=input(“Enter Number:”)
DoubleTheNumber = Number * 2
Print(DoubleTheNumber)
Q.29 Write a program to read base (b), width (w) and height (h) of a parallelogram and calculate
its area and perimeter.

Area = b * h, Perimeter = 2*b + 2*w

SECTION - C
Answer the following questions: [3x5=15]
Q.30 Give python code to check if the given value is prime number.
Q.31 Give python to check whether the character entered by the user is vowel or consonant.

PT-2 / HALF YEARLY EXAM | INFORMATICS PRACTICES | CLASS 11 | 2022-23 | PRINTED Q 29 PRINTED PAGES 5 | PAGE# 4
Q.32 Give python code to display the following pattern using loops:
$$$*
$$**
$***
****
Note: $ indicates space
Q.33 Write a program that asks the user to input a number or a list to be appended to an existing
list. Whether the user enters a single number or a list of numbers, the program should
append the list accordingly.
OR
Write a program to input a list of integers and display minimum element along with its
index without using the readymade functions (sort, sorted, min).
Q.34 Write a program that accepts a list of integers from the user and display the sum of even
numbers and sum of odd numbers separately.
Ex: Input = 2,3,4,6,8,1,5
Output:
Sum of even numbers: 20 (i.e. 2+4+6+8)
Sum of odd numbers: 9 (i.e. 3+1+5)
SECTION - D
Answer the following questions: [4x2=8]
Q.35 Give python code to calculate sum of following series using loops:
1+2+4+7+11+16 up to n terms.
OR
Give python code to accept a string and display the string in following format:
Ex: Input = OPJS
Output:
O
OP
OPJ
OPJS
Q.36 Give python code to calculate the sum of following series:
1-2+3-4+5-6+7-8….. upto n terms.
Note: n is any value entered by the user.

PT-2 / HALF YEARLY EXAM | INFORMATICS PRACTICES | CLASS 11 | 2022-23 | PRINTED Q 29 PRINTED PAGES 5 | PAGE# 5

Common questions

Powered by AI

The primary issue with the provided code is that the 'input' function returns a string, not an integer. Therefore, multiplying a string by 2 results in the string being repeated, not doubled numerically. To correct this, the input must be converted to an integer: 'Number=int(input("Enter Number:"))'. This will ensure the arithmetic operation 'DoubleTheNumber = Number * 2' correctly calculates the numeric double of the input value .

List slicing in Python allows the extraction of a specific subset of items from a list by specifying a start and an end index. For example, using L[-4:-1] on the list L = [10, 20, 30, 40, 50, 60, 70] will return [40, 50, 60]. Here, '-4' indicates starting at the fourth-to-last element, and '-1' stops before the last element, effectively slicing out a sublist of specified length .

Floor division, indicated by '//' in Python, is advantageous when an integer quotient without the fractional part is needed, which can help prevent errors in calculations requiring whole numbers, such as for indexing in data structures or during discrete simulations. It produces consistent integer results even when dividing negative numbers, which helps in maintaining accuracy and predictability in certain logical conditions and control structures .

An interpreter translates high-level code to machine code line-by-line, executing each instruction directly and immediately. In contrast, a compiler translates the entire program into machine code before execution, generating an executable file. This difference affects software development in terms of development speed and performance: interpreters are beneficial for testing and debugging due to their immediate feedback, whereas compilers typically produce faster-running programs due to the pre-translation into machine code .

Negative indexing in Python allows accessing elements from the end of a list where '-1' corresponds to the last element. This feature simplifies operations when the position of an element is better defined from the end of a list rather than from the start. For instance, with the list 'smiles', accessing the last element can be done with 'smiles[-1]', efficiently retrieving the element without needing to calculate its position from the front, especially useful in dynamically sized collections .

Cache memory is a small-sized type of volatile computer memory that provides high-speed data storage and retrieval, enhancing the performance of a microprocessor by reducing the time needed to access data from the main memory. It stores frequently used instructions and data to be quickly accessed by the CPU, which minimizes latency and increases efficiency in data processing. By acting as an intermediary between the CPU and main memory, cache memory significantly improves the speed at which the processor can perform tasks, compared to relying solely on the much slower main memory .

In Python, logical operators like 'or' return the first operand if it evaluates to True, otherwise, they return the second operand. For the expression '10 or 0', since the first operand '10' is considered True (non-zero value), it will return '10'. The 'or' operator checks operands from left to right and returns the first True-like value encountered without evaluating the rest .

Python's loop control structures, like 'for' and 'while', are designed on the principle of readability and simplicity, providing clear and concise ways to iterate over sequences such as lists, strings, or ranges. Unlike languages that require explicit initialization and incrementation, Python's 'for' loop directly iterates over items, promoting cleaner and less error-prone code. This high-level abstraction is analogous to 'foreach' loops in other languages, reducing the cognitive load on developers and enhancing the manageability of iteration processes .

Open-source software is characterized by its source code being freely accessible for anyone to view, modify, and distribute. This promotes collaborative development and innovation. Freeware, on the other hand, is software that is available without cost but does not necessarily allow modification or redistribution of its source code. Thus, while both may be free to use, open-source software provides more freedom in terms of software manipulation and collaboration .

Python evaluates conditional statements sequentially, executing the block of the first true condition. In a compound expression, 'if-elif-else', once a true condition block is executed, others are skipped. In the code 'x = 3 if x == 8: print ("Am I here?") elif x == 3: print("Or here?") else: print ("Or over here?")', since x is 3, it matches the 'elif' condition, executing 'Or here?', then exits, showing how logical branching depends on condition satisfaction order .

You might also like