Import Pandas As PD S1 PD - Series ( (1,2,3,4) ) S2 PD - Series ( (7,8) ) S3 S1 + S2 Print (S3.size)
Import Pandas As PD S1 PD - Series ( (1,2,3,4) ) S2 PD - Series ( (7,8) ) S3 S1 + S2 Print (S3.size)
Import Pandas As PD S1 PD - Series ( (1,2,3,4) ) S2 PD - Series ( (7,8) ) S3 S1 + S2 Print (S3.size)
Periodic Test – 1
Subject : IP
Total Marks : 40 Time : 90 minutes
Following Instructions:
1) Question 1 to 40 Are multiple choice objective type questions .
2) Total 40 questions and 1 mark per question
Code: Mr. Sharma is working in a game development industry and he was comparing the
given chart on the basis of the rating of the various games available on the play store
He is trying to write a code to plot the graph. Help Mr. Sharma to fill in the blanks of the
code and get the desired output.
import__________________________ #Statement 1
Games=["Subway Surfer", "Temple Run", "Candy Crush", "Bottle Shot", "Runner Best"]
Rating=[4.2,4.8,5.0,3.8,4.1]
plt.______________(Games, Rating) #Statement 2
plt.xlabel("Games")
plt.______________("Rating") #Statement 3
plt._______________ #Statement 4
3. Identify name of function that should be used in statement 2 to plot above graph
A) line() C) barh()
B) hist() D) bar()
5. Choose the right function/method from the following for the statement 4.
A) display() C) bar()
B) print() D) show()
6. In case Mr. Sharma wants to change the above plot to the any other shape, which
statement, should he change.
A) Statement 1 C) Statement 2
B) Statement 3 D) Statement 4
11. In data science for data analysis, which of the python library are more popular ?
A) Pandas C) Django
B) Swift D) OpenCv
12. Pandas Libarary is mainly used for _____ in ______ filed for Python.
A) Critical Thinking, Object Oriented Programing
B) Indexing, Game Development
C) Graphic Designing, Computer Vision
D) Data Analysis, Data science
13. Which of the following is used to get the "number of dimensions" of a Series object ?
A) index C)itemsize
B) size D)ndim
24. Choose the command that will give the following output
b 200
c 300
dtype: int64
A) print(S1[:3]) C) print(S1[1:3])
B) print(S1[0:3]) D) print(S1[2:4])
25. Help him to identify the correct statement that can be used to extract the value with the
index 'c'
A) print(S1[c]) C) print(S1(c))
B) print(‘S1’[c]) D) print(S1[‘c’])
26. Which of the following command will give the following output
b 200
d 400
A) print(S1.iloc[1:4]) C) print(S1.iloc(1:4))
B) print(S1.iloc[2:4]) D) print(S1.iloc[1:4:2])
27. Which of the following command will display the series by adding 10 in eachvalue.
A) print (S1 [+10]) C) print(S1 + 10)
B) print(S1) + 10 D) print(S1) + print (10)
28. Ayush wants to delete the value against index 'd'. Help him to choose the suitable option:
A) S1= S1.drop(d) C) S1= drop(‘d’)
B) S1= S1.drop(‘d’) D) S1= S1.drop[‘d’]
29. Which Syntex is used to save the plot in the code in Matplotlib?
A) plt.savefig() C) plt.savef()
B) plt.fig() D) plt.figsave()
A) 0 10 C) 1 10
1 11 2 11
2 12 3 12
B) [10,11,12] D) Error
A) 0 IP C) ERROR
1 ACC