Data science and analytics questions
Data science and analytics questions
Section M001
1. What is the correct order of steps to run the first python programme on google colab?
A) Write python code
B) Run code
C) Output
D) Open google colab and create a new files.
Select an option
o B->A->D->C
o D->A->B->C
o C->A->D->B
o A->B->C->D
Section M002
2. Which of the following is the correct data type of variable B in the given code
snippet?
#Python Code
age=20
if (age>18):
print(“You Can
Drive!) else:
print(“You can not Drive!”)
Select an option
o Tuple
o Set
o Dictionary
o List
6. You are given a list of marks of students. There are some duplicate values in this
list and your task is to remove those duplicate values from the list. Which of the
following datatypes can remove duplicate values from the list?
Select an option
o Tuple
o String
o Set
o Dictionary
Section M003
7. Suppose you have 2 different strings. A and B. Now you want to print the string
whose length is greater, for which you have to use the comparison operator. Select
the correct one from the following options according to the situation.
Select an option
8. Which operator gives the output as true only when both the inputs are true and case
if any one of the inputs is false, the output is given as false?
Select an option
o Is not
o And
o Or
o Not
Section M004
11. Which of the following options is a loop statement in Python?
Select an option
o For
o Break
o Do-while
o Elif
12. Which of the following options is typically the correct sequence of flow for the while
loop execution ?
1) Increment
2) Enter in while loop
3) Exit from loop
4) Analysing expression
Select an option
o 2->3->1->4
o 2->4->1->3
o 4->3->2->1
o 4->1->3->2
Section M005
13. Which of the following options is correct about the lambda function?
Select an option
o Small anonymous function
o Can only take 1 argument
o Multiline function
o Define using def keyword
14. Which of the following is the correct sequence to define a python function?
A) Add Parameters
B) End function with a return statement
C) Use the keyword def to declare the function.
D) Add statement that the functions should execute.
o C->A->D->B
o A->C->D->B
o D->A->C->B
o C->B->A->D
Section M006
15. Which of the following options is used to find the minimum value in a numpy array?
o numpy.min(arr)
o min(array)
o numpy.reshape()
o numpy.max(arr)
16. Consider the following code:
Import numpy as np
arr= np.array([10,20,30,40])
print(np.sum(arr))
print(np.min(arr))
print(np.mean(arr)
print(np.max(arr))
which of the following is the correct order of output for the above code?
A) 40
B) 25.0
C) 10
D) 100
Select an option
o B->C->A->D
o C->B->A->D
o A->B->C->D
o D->C->B->A
Section M007
17. What will be the minimum number of arguments required to pass in pandas series?
o 0
o 1
o 2
o 3
18. You are given a pandas series. Now, you want to change index of series with
alphabets A, B, C, D and E. which of the following code is correct that can change
the index of series with alphabets A, B, C, D and E?
A. Import pandas as pd
Series 1 = pd.series([10,20,30,40,50),index = [“A”,”B”,”C”,”D”,”E”]
B. Import pandas as pd
Series 1 = pd.series([10,20,30,40,50),Value= [“A”,”B”,”C”,”D”,”E”]
C. Import pandas as pd
Series 1 = pd.series([10,20,30,40,50),[“A”,”B”,”C”,”D”,”E”]
D. Import pandas as pd
Series 1 = pd.series([10,20,30,40,50)
19. Suppose you are developing an automatic speech recognition system using natural
language processing to convert human speech into text. Which of the following
technologies would you use to develop an automatic speech recognition system?
A. Cloud computing
B. Cyber security
C. Machine learning
D. Internet of things
20. Match the method with the correct description:
Method Description
1) statistics.mean() a) Calculates the standard deviation from a sample of data.
2) statistics.median() b) calculates the mode of the given numeric data
3) statistics.mode() c) calculate the median of the given data
4) statistics.stdev() d) calculates the mean of the given data
Select an option
o 1-d, 2-a, 3-b, 4-c
o 1-b, 2-c, 3-d, 4-a
o 1-b, 2-c, 3-d, 4-a
o 1-c, 2-d, 3-a, 4-b
21. which of the following is/are used to analyse the data in pandas?
A) Data frame
B) Series
C) String
Select an option
A. A and C
B. A and B
C. A,B and C
D. B, C
Section M008
22. Social media sites such as Facebook and Twitter contain billions of user profiles,
which need to be stored and managed in a very efficient way. This technology can
organise and manage massive amounts of data and can analyse lots of data to identify
the latest trends, hashtags, and requirements of different users. According to the
above scenario, which technology id likely to be used?
A. Internet of things C. Cloud computing
B. Artificial intelligence D. Cyber security
Section M010
25. Which of the following options is not typically used to visualise the data?
Select an option
o Shapes
o Maps
o Graphs
o Chart
26. You are given two numpy arrays, X and Y, X Values are x axis values and y-axis
values.you need to plot a scatter graph using x and y values. Select the correct one
from the following options to plot a scatter graph (libraries are already imported).
X = np.array([5,7,8,7,2,17]
Y = np.array([99,86,87,88,111,87]
Select an option
o plt.bars(x,y)
plt.show()
o plt.hist(x)
plt.show()
o plt.pie(y)
plt.show()
o plt.scatter(x,y)
plt.show()
Section M011
27. You are working with pandas and numpy library in python. You have been given
a pandas data frame. Now you want to visualize randam distributions of data
frame. Which of the following libraries is used to visualize the random
distribution?
A. Plotly and cufflinks
B. Numpy
C. Seaborn
D. Scipy
Section M012
Select an option
o C->A->B
o A->B->C
o B->A->C
o B->C->A
30. What will be output for the following code?
import pandas as pd
s = pd.series([1,2,3,4,5])
print s[‘0’]
Select an option
a. 3
b. 1
c. 5
d. 2
Section M013
31. Suppose you are working with python data visualization, you are given a data frame
and you want to plot various charts like line charts, scatter plots, histograms, cox
plots, pie chart, 3D line plots. Which of the following python libraries supports the
various types of plot?
Select an option
o Pandas
o Cufflinks
o Scipy
o Plotly
32. Which of the following is the correct order of sequence to program using plotly and
cufflinks libraries to create interactive data visualization?
A) Install plotly and cufflinks
B) Use cf.go_offline()
C) Add data set as, data = pd.read_csv(“sample_data.csv”) and display the plot as
96matplotlib inline.
D) Import plotly, cufflinks, pandas and numpy.
Select an option
o A->B->C->D
o A->D->B->C
o D->A->C->B
o C->B->A->D
Section M014
Section M015
36. you are working on a raw data to process the data using python data pre-processing.
Now, you need to separate the data into train set and test set. Which of the
following operations you have to perform to separate data into train set and test set?
o Data mining
o Data transformation
o Data splitting
o Data cleaning
37. which of the following is the correct order of steps for data pre-processing?
A) Data transformation
B) Collecting raw data (primary data)
C) Data cleaning
D) Data splitting
Select an option
o B->C->D->A
o B->C->A->D
o B->A->C->D
o C->A->D->B
38. Which of the following techniques is/are used for data transformation to convert data
into one from to another without losing the informational right?
A) Standardization
B) Normalization
C) Min max scalar.
D) Dummy variables
Select an option
o A and C
o A, B, C and D
o A and D
o A, B and D