XIInfo Pract H Y 416

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

PRAGYA GIRLS SCHOOL

Half Yearly Examination


Name: _________________________ Subject: Informatics Practices
Roll No.________________________ Academic Session: 2023-24
Date: 27/09/2023 Grade: XI
Duration: 03 Hours Maximum Marks: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 02 questions carrying 04 marks each.
7. Section E has 03 questions carrying 05 marks each.
8. All programming questions are to be answered using Python Language only.

Q. No. Section A Marks


1. Fill in the blank: 1
__________ is a language translator which reads a program line-by-line when run.
a. Compiler b. Assembler c. Transmitter d. Interpreter
2. What will the expression 2**2**2 be evaluated to in Python? 1
a. 16 b. 128 c. 64 d. 8
3. In a SD card, the letter SD stands for…... 1
a. Secure Device b. Secure Digital c. Storage Device d. Standard Device
4. The term bit is an abbreviation for the expression ______________ ? 1
5. Which is the default python command prompt? 1
a. <<< b. <<< c. >>>> d. <<<<
6. Predict the output of the following python code: 1
>>>for i in range(1,11,2):
print(i, end=” “)
7. Which of the following is a valid data type in Python? 1
a. Real b. Floating Point c. Decimal d. Letter
8. What is the extension of python program file? 1
9. Operating System is an example of: 1
a) Application Software b) System Software
c) Utility Software d) None of the above
10. DVD is a type of …………….memory. 1
a) Primary b) RAM c) Secondary d) All of these

--1--
11. Which of the following memory types cannot store the data or information 1
permanently? a) Flash memory b) RAM c) DVD d) Hard disk
12. Which of the following are valid identifier(s)? 1
a. roll no b. _rollno c. roll_no d. roll-no e. rollno f. num01
13. Which of the following is an escape sequence for a newline character? 1
a. \a b. \t c. \b d. \n
14. What values are generated when the function list(range(8,0,-2)) is executed? 1
a. [8,4] b. [8,4,2,0] c. [8,6,4,2,0] d. [8,6,4,2]
15. What is the output produced when this code executes? 1
k=0
for i in range(4,8):
if i%2 ==0:
k=k+i
print(k)
a. 4 b. 8 c. 10 d. 18
16. If L=[1,2] then L*2 will yield: 1
a. [1,2]*2 b. [1,2,2] c. [1,1,2,2] d. [1,2,1,2]
17. Given a list L = [10,20,30,40,50,60,70,80], what would L[-3:99] return? 1
a. [20,30,40] b. [30,40,50] c. [40,50,60] d.[60,70,80]

18. What is the output when we execute list(“hello”)? 1


a.[‘h’,’e’,’l’,’l’,’o’] b. [‘hello’] c.[‘olleh’] d.[‘llo’]
Section B
19. What will be the output of the following Python code? 2
x, y=4, 2
while(x>=y):
print(x, y)
x=x-1
y=y+1
a) 4, 2 b) Invalid syntax c) 2, 4 d) Error
3, 3 3, 3
20. What is the result of this statement: 2
>>>10>5 and 7>12 or not 18>3
a) 10 b) True c) False d) None
21. (a) What will be the output of the following Python code? 2
>>> print(math.ceil(55.1))
(b) Which python module required to run above code successfully?
22. What is token? Name various types of token. 2
23. What will be the output of the following Python code? 2
>>> a=72.55
>>> b=10
>>> c=int(a+b )
>>> c
a) 72.55 b) 72 c) 82 d) None of these
24. How the pop ( ) function is different from remove( ) function working with list 2
in python ?
25. What is mutable and immutable data objects in Python? Name any one of each type. 2

--2--
Section C
26. What will be the output of following code- 3
1. >>>a={i: 'Hi!' + str(i) for i in range(5)}
>>>a
2. >>> a={i: i*i for i in range(6)}
>>>a
3. >>>dict1 = {"key1":1, "key2":2}
>>>dict2 = {"key2":2, "key1":1}
print(dict1 == dict2)
27. Rewrite following code after removing errors (if any): 3
N=100
A= “Number” +5
B= 2N +20
Print(B)
28. Write a program to print following series – 3
2,4,8,16, …………….
Expected Output:
Enter the terms=5
2,4,8,16,32,
29. What is difference between break and continue statement in Python explain 3
with an example.
30. Find the output of the following code: 3
>>> L=["These", "are", "a", ["few", "words"], "that", "we", "will", "use"]
>>> print (L[3:4])
>>> print (L[1:4:-1])
>>> print ("few" in L)
>>> print (L[0::2])
>>> print (L[4:])
>>> print (L)
Section D
31. What will be the output of the following code? 4
i. type(34)
ii. a, b=10,20
a, b= b, a+b
print(a, b)
iii. a=20 + 4j
print(a.real + a.imag)
iv. print(10,20,30, sep=’*’,end=’@’)
32. 1. Write a python program to print a sum of series up to 10 integers using for 4
loop.
2. Write a program to input a list of numbers and find the smallest and largest
number from the list.
Expected Output:
how many elements to be entered: 4
enter elements : 1
enter elements : 2
enter elements : 5
enter elements : 4
Largest element in the list is 5
Smallest element in the list is 1

--3--
Section E
33. What will be the output of the following python code? 5
(a) [11, 14, 18, 10, 15]
(b)['P', 'Y', 'T', 'H', 'O', 'N']
(c) L1.insert(0,12)
(d) L1.sort()
(e) L1.remove(14)
(f) L1.append(5)
(g) L2.pop()
(h) L1+L2
(i) L1.extend([12,16,18])
(j) L1*2
34. Explain the following : 5
1. What is syntax error? Give one example.
2. What is the difference between ‘=’ and ‘==’? Explain with the help of an
example.
3. What do you understand by precedence of operators? What is the
precedence of arithmetic operators?
35. a. Write a Python program to create a dictionary to store names of states 5
and their capitals.
b. Write a Python program to create a third dictionary from two
dictionaries in the way so that the values are shown in third dictionary.

--4--

You might also like