Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

SSASLG/PT-I/2024-25

PERIODIC TEST-I
CLASS: XII
SUBJECT: Informatics Practices
SESSION: 2024-2025

Time: 1 Hour F.M.: 30


=========================================================================
General Instructions:
1. This question paper contains Three Sections.
2. All questions are compulsory.
3. Section A(Q1 to Q5) Contains Very Short questions carrying 5 marks.
4. Section B(Q6 to Q10) Contains Short Answer Type questions carrying 10 marks.
5. Section C(Q11 to Q15) Contains Long Answer Type questions carrying 15 marks.

Q. Marks
No.
SECTION: A
1. Which of the following is a two-dimensional labelled data structure of Python 1
a) Relation b) DataFrame
c) Series d) Square
2. Which of the following statement is wrong? 1
a) Can’t change the index of the Series
b) We can easily convert the list, tuple, and dictionary into Series
c) A Series represents a single column in memory
d) We can create empty Series
3. Consider the following code: 1
import numpy as np
import pandas as pd
l=np.array([10,20])
x=pd.Series(__________) #statement1
print(x)
output of the above code is:
0 1000
1 8000
dtype: int64
Page 1 of 3
SSASLG/PT-I/2024-25

What is the correct statement for the statement1?


a) D=l*3 b) data=l**3
c) l*3 d) [10,20]**3
Q4 is ASSERTION AND REASONING based question. Mark the correct choice as
a) Both A and R are true and R is the correct explanation for A
b) Both A and R are true and R is not the correct explanation for A
c) A is True but R is False
d) A is false but R is True
4. Assertion: The output of addition of two series will be NaN, if one of the elements or both 1
the elements have no value(s).
Reasoning: While performing mathematical operations on a series, by default all missing
values are filled in with 0.
5. Which attribute is not used with DataFrame? 1
a) size c) type
b)empty d) columns
SECTION: B
6. What will be the output of the following code: 2
import pandas as pd
S1=pd.Series(data=2*(3,5))
print(S1)
7. Write a program in Python to create a Series in Python from the given dictionary. 2
D = {‘Jan” : 31, "Feb" : 28, “Mar” : 37}
8. Write a program in Python to create the pandas series of all the characters in the name 2
accepted from user.
9. Write a program to display the following Series “S1” in descending order 2
0 300
1 100
2 1200
3 1700
10. Define data structure in Python. With example. 2
SECTION: C
11. Given two series S1 and S2 3
S1 S2
A 39 A 10
B 41 B 10
C 42 D 10
D 44 F 10
Find the output for following python pandas statements?

Page 2 of 3
SSASLG/PT-I/2024-25

a) S1[:3]*50 b) S1+S2 c) S2[::-1]*20


12. What will be the output of the following code? 3
import pandas as pd
import numpy as np
s = pd.Series(np.arange(10,50,10))
print(s)
print (s.ndim)
print(s.shape)
print(len(s))
13. What will be the output produced by the following programming statements 1 & 2? 3
import pandas as pd
S1=pd.Series(data=range(10,100,10)])
print(S1>75) #Statement1
print(S1[S1>65]) #Statement2

14. Write a Python code to create a DataFrame with appropriate column headings from the list 3
given below:
[[101,'Gurman',98],[102,'Rajveer',95],[103,'Samar' ,96],[104,'Yuvraj',88]]
15. Write a program in Python to create series of vowels. 3

Page 3 of 3

You might also like