Professional Documents
Culture Documents
Preterm-I Subject: Informatics Practices (Code-065) Class - Xii
Preterm-I Subject: Informatics Practices (Code-065) Class - Xii
General Instructions:
• The paper is divided into 3 Sections- A, B and C.
• Section A, consists of Question 1 to 25 and student need to attempt 20 questions.
• Section B, consists of Question number 26 to 49 and student need to attempt 20 questions.
• Section C, consists of Question number 50 to 55 and student need to attempt 5 questions.
• All questions carry equal marks.
Section – A
Section A consists of 25 questions, attempt any 20 questions.
1. Series means-
(a)One-dimensional array *
(b)Two-dimensional array
(c)An array without index
(d)None of the above
10. If a Dataframe is created using a 2D dictionary, then the indexes/row labels are formed from
(a) dictionary's values (b) inner dictionary's keys
(c) outer dictionary's keys (d) none of these
11. Stealing someone else's intellectual work and representing it as own, is called
(a) Intellectual steal (b) Pluckism (c) Plagiarism (d) Pickism
Section – B
Section B consists of 24 Questions (26 to 49). Attempt any 20 questions.
26. Write the command in the blank to obtain the given output:
import pandas as pd
a=[10,20,30,40]
s1= _____________________
print(s1)
Output:
One 10
Two 20
Three 30
Four 40
(a) pd.Series(a,index=['One','Two','Three','Four'])
(b) pd.Series(a=['One','Two','Three','Four'],index)
(c) pd.Ser(a,index=['One','Two','Three','Four'])
(d) Create Series(a,index=['One','Two','Three','Four'])
27. Assuming the given series, named Salary, which command will be used to increase 2000 in
every employee’s salary?
Om 35000
Vinay 35000
Simi 50000
Nitin 54000
Nandi 60000
dtype: int64
(a) Salary*2000 (b) Salary.add(2000) (c) Salary+2000 (d) Salary.count()
28. Ananya wants to store her Term-I marks in a Series which is already stored in a NumPy
array. Choose the statement which will create the series with Subjects as indexes and Marks as
elements.
import pandas as pd
import numpy as np
Marks =np.array([30,32,34,28,30])
subjects = ['English','Maths','Chemistry','Physics','IP']
Series1= _______________________________
(a) pd.Series(Marks,index=subjects) (b) pd.Series(np.Marks,index=subjects)
(c) PD.Series(index=Marks, subjects) (d) Pd.Series(Marks,index)
29. ______________ is a security device that can help protect your network by filtering traffic
and blocking outsiders from gaining unauthorized access to private data on your computer.
(a) Protocol (b) Firewall (c) Cracker (d) Spam Filter
30. Observe the following figure. Identify the coding for obtaining this as output-
Section - C
Section C, consists of 6 Question (50 to 55). Attempt any 5 questions.
Case Study
Ms. Nandini is working in a school as an IT head. She has been assigned the task to analyze the
performance of the students of Class X. She has written a snippet for maintaining student details
using a dataframe for all the classes but is facing some problem with it. Help her to rectify the
code so as to obtain the desired results.
import pandas as pd
StuName=['Kirti','Gunjan','Neetu','Pranjal','Kamal']
AdmNo=[101,102,103,104,105]
Eng=[87,76,68,90,88]
Hindi=[80,79,75,59,60]
Maths=[90,76,66,78,86]
Science=[65,65,68,97,68]
SST=[68,70,60,50,66]
data={'AdmNo':AdmNo,'StudName':StuName,'English':Eng,'Hindi':Hindi,
'Maths':Maths,'Science':Science,'SST':SST}
Record=pd.DataFrame(data)
print(Record)
Output:-
AdmNo StudName English Hindi Maths Science SST
0 101 Kirti 87 80 90 65 68
1 102 Gunjan 76 79 76 65 70
2 103 Neetu 68 75 66 68 60
3 104 Pranjal 90 59 78 97 50
4 105 Kamal 88 60 86 68 66
50. She wants to add a new column with name of subject ‘Computer’ in above data frame choose
the right command to do so:
(a) Computer(“Record”)=[67,90,78,88,79]
(b) Record[“Computer’']=[67,90,78,88,79]
(c) Computer[“Record”]=[67,90,78,88,79]
(d) Record(“Computer’')=[67,90,78,88,79]
51. She wants to set all the values to zero in data frame, choose the right command to do so:
(a)Record=0 (b) Record []=0 (c) Record [:]=0 (d) Record [:]==0
52. She wants to delete the marks of AdmNo=104:
(a) Record.drop(3, axis=1) (b) Record.drop(104, axis=0)
(c) Record.drop(3, axis=0) (d) Record.drop('104', axis==0)
53. What will be the size and shape of dataframe Record?
AdmNo StudName English Hindi Maths Science SST
0 101 Kirti 87 80 90 65 68
1 102 Gunjan 76 79 76 65 70
2 103 Neetu 68 75 66 68 60
3 104 Pranjal 90 59 78 97 50
4 105 Kamal 88 60 86 68 66
(a) Size = 40 , Shape = (7, 5)
(b) Size = 35, Shape = (5, 7)
(c) Size =35, Shape = (7,5)
(d) Size = 40, Shape = (5,7)
54. Which of the following command will change the column name Hindi to Language-
(a) Record=Record.rename({'Hindi':'Langugae'},axis=1)
(b) Record=Record.rename({'Hindi':'Langugae'},axis=0)
(c) Record=Record.rename({Hindi:Langugae},axis=1)
(d) Record=Record.rename({Hindi:Langugae},axis=0)
55. What will be the output of the given command?
AdmNo StudName English Hindi Maths Science SST
0 101 Kirti 87 80 90 65 68
1 102 Gunjan 76 79 76 65 70
2 103 Neetu 68 75 66 68 60
3 104 Pranjal 90 59 78 97 50
4 105 Kamal 88 60 86 68 66
print(Record.empty)
(a)NaN
(b)[ ]
(c) False
(d)[0,0,0,0,0]
(Answers)
1 a 21 d 41 c
2 c 22 d 42 b
3 c 23 c 43 c
4 d 24 c 44 c
5 d 25 d 45 c
6 a 26 a 46 b
7 d 27 c 47 b
8 d 28 a 48 a
9 c 29 b 49 c
10 b 30 b 50 c
11 c 31 c 51 c
12 d 32 b 52 c
13 c 33 a 53 b
14 c 34 b 54 a
15 b 35 c 55 c
16 a 36 d
17 d 37 b
18 c 38 c
19 c 39 c
20 d 40 b