Professional Documents
Culture Documents
Test1 Series
Test1 Series
Class- XII
Max. Marks – 25
Q1. Create a series ‘COLOURS’ having 4 elements with index labels ‘R’, ‘G’,’B’,’W’ and
data as color names as RED, GREEN, BLUE,WHITE. (1)
Q2. Create a series Friends from a dictionary having roll numbers of 5 of your friends
as keys and their names as data. (1)
Q4. Consider the below given code fragments. Will they produce the same output?
Why/Why not? (2)
CODE1 CODE2
A=[5,6,9] A=pd.Series(data=[5,6,9])
Obj1=pd.Series(data=A*2) obj2=pd.Series(data=A*2)
print(obj1) print(obj2)
Q6. Consider two objects X and Y. X is a list and Y is a series. Both have values
10,20,30,100. What will be the output of the following two statements considering that
the above objects have been created already? (3)
1) print(X+2) 2) print(Y+2)
Also justify your answer.
Q7. Give the output of the following code? (6)