Informatics Practices Q & A
Informatics Practices Q & A
CLASS XII
INFORMATICS PRACTICES (065)
TIME: 03 HOURS M.M.: 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.
SECTION A
1. The weakend signal appearing on the cable is regenerated and put back on the cable by a 1
.
i. Hub
ii. Modem
iii. Gateway
iv. Repeater
2. Which of the following statement will print Series “S!” in reverse order? 1
i. print (S1[: : 1])
ii. print (S1[: : -1])
iii. print (S1[-1 : : 1])
iv. print(S1.reverse())
3. The data label associated with a particular value of Series is called its . 1
i. Data Value
ii. Index
iii. Value
iv. None of the above
12. In Python Pandas, while performing mathematical operations on series, index matching 1
is implemented and all missing values are filled in with _by default.
i. Null
ii. Blank
iii. NaN
iv. Zero
15. Which of the following pyplot function is used to set the label for the x-axis. 1
i. Xlabeled( )
ii. Xlabel( )
iii. xlabel( )
iv. x_axis_label( )
16. To show the grid lines in plot, we can write . 1
i. plt.grid( )
ii. plt.grid(True)
iii. Both of the above
iv. None of the above
18. Assertion (A):- When DataFrame is created with list of dictionaries, the columns are 1
created from dictionary names.
Reasoning (R): - When DataFrame is created with 2D list, column and index are
labelled to 0,1,2…. by default.
i. Both A and R are true and R is the correct explanation for A
ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True
SECTION B
20. The python code written below has syntactical errors. Rewrite the correct code 2
and underline the corrections made.
Import pandas as pd
df ={"Technology":["Programming","Robotics","3D
Printing"],"Time(in months)":[4,4,3]}
df= Pd.dataframe(df)
Print(df)
Ans:
import pandas as pd
df={“Technology”:[“Programming”, “Robotics”, “3DPrinting”],
“Time(in months)”:[4,4,3]}
df=pd.DataFrame(df)
print(df)
2
21. Which attribute of DataFrame is used for the following?
i. To display row labels. DataFrame.index
ii. To display data type of each column in the DataFrame. DataFrame.dtypes
iii.To display number of rows and columns in a tuple.DataFrame.shape
iv.To transpose the DataFrame.DataFrame.T
22. Sahil, a class X student, has just started understanding the basics of internet and web 2
technologies. He is a bit confused in between the terms “World Wide Web” and “Internet”.
Help him in understanding both the terms with help of suitable examples of each.
24. Complete the given Python code to get the required output.
import pandas as pd
L1=[[“Aman”,45],[“Ankit”,56],[“ Sunita “,67]]
DF = pd. DataFrame (L1, columns
=[“Name”,”Marks”],
index = [ 1,2,3 ])
print(DF)
25. Write a program to create a Series whose values are characters of the name accepted from 2
the user.
SECTION C
26. Write the statements in python to plot line chart “Name” vs “Quantity” within the 3
following data.
Name = [“Keyboard”, “RAM”, “Mouse”]
Quantity = [10,7,20]
30 Write python code to plot horizontal bar chart for class wise result analysis as shown below. 3
Give appropriate chart title and axes labels
SECTION D
Height_cms=[145,141,142,142,143,144,141,140,143,144]
Write suitable Python code to generate a histogram based on the given data, along
with an appropriate chart title and both axis labels.
Also give suitable python statement to save this chart.
32 Ekam, a Data Analyst with a multinational brand has designed the DataFrame 4
df that contains the four quarter’s sales data of different stores as shown below:
Store Qtr1 Qtr2 Qtr3 Qtr4 0
Store1 300 240 450 230
Store2 350 340 403 210
Store3 250 180 145 160