MS-DS(UoA) Course-02 Exam Paper Guidelines
This document will provide you with all the necessary information regarding the exam details for
Course 2.
Guidelines for Learners:
1. The total duration of the exam is for 110 minutes and the total number of questions in a
set will be 45.
2. All the questions in the exam will be objective and NOT subjective.
3. Please check the sample questions for understanding the difficulty level and the type of
questions that can come in SCQs, MCQs and the coding ones.
4. The exam will be conducted on a platform called Mettl.
Please note that the following type of questions will be asked for different modules falling in the
Course 2 of the MS DS UoA program.
Please note: the below matrix suggests the tentative number of questions
Course 2 SCQ MCQ Coding
Concept:
Libraries for Data Science: NumPy
11 1 2
Libraries for Data Science: Pandas
Data Visualization
Exploratory Data Analysis 12 2 2
Inferential Statistics + Hypothesis 12 2 1
The table below explains the kind of questions that can be expected. The list given below is not
exhaustive and there can be questions which do not follow the pattern described.
Topics Questions will be based on:
Essential Libraries 1. Checking syntax of given code
and Data 2. Writing code to serve a given function
Visualization 3. Interpreting given data visualization
4. Keywords used to modify specific functions in a plot.
EDA 1. Theoretical question about data exploration actions one should
take in certain situations
2. Writing a code to perform data exploration in a given situation.
3. Interpreting data visualization to gain insights
Inferential and 1. Mathematical questions about calculating probability and
Hypothesis probability distributions. Calculations to be performed
manually.
2. Calculating z values for a given hypothesis and rejecting the
hypothesis or failing to reject the hypothesis calculations will
be manual.
In the following table, the weightage of each question type along with sample questions for each
type.
Number of Marks per
Type Questions Question
SCQs 35 1
MCQs 5 1
Coding 5 2
Total 50
-----------------------------------------------------------------------------------------------------------------------
Please note for our exam terminology here SCQ means single choice question (this means,
such questions will have only 1 correct answer among the options given).
MCQ means multiple choice questions (this means, such questions may have one or more
than one correct answer among the options given).
*Also, please note that: the distribution of questions per topic is tentative and is subject to
change. Also, the sample assessments reflect only a small portion of what kind of questions
could be asked on a topic. The learners are expected to study for questions not asked in the
sample questions as well.
Sample Questions -
SCQ
NumPy
What will the output of the following code be?
import numpy as np
l = np.array([[32, 40], [14, 25], [33, 40]])
l.ndim
a. 0
b. 1
c. 2
d. 3
Question Name NumPy
Right answer Option (c)
Correct Answer Correct! The ndim method determines the dimensions of an array.
Feedback Clearly, l is a 2 dimensional array. So, l.ndim returns 2.
SCQ
Pandas filtering
Consider a dummy employee table which you could query using the code given below:
import pandas as pd
df = pd.read_csv(“employee.csv”)
df.Name.[df[Salary] > 10000]
The output of the code will give you is:
a. All of the rows with Salary greater than 10000
b. Name in the rows with Salary greater than 10000
c. All of the rows with Salary less than 10000
d. Syntax error
Question Name Pandas filtering
Right answer Option (d)
Correct Answer Correct! Salary must be kept in single quotes here.
Feedback
SCQ
Probability
A bag contains 2 red balls and 3 blue balls. A ball is drawn 3 times without replacing the ball.
The probability of getting more than 1 blue ball is:
a. 0.3
b. 0.4
c. 0.6
d. 0.7
Question Name Probability
Right answer Option d
Correct Answer Correct! Look at the cases where only one blue ball is drawn
Feedback {RRB, RBR, BRR}.
Probability of getting no blue balls is 0 due to sample space
available
Probability of getting only one blue ball = ⅖ x ¼ x 1 + ⅖ x ¾ x ⅓ +
⅗ x 2/4 x ⅓ = 3/10
Probability of getting more than 1 blue ball = 1 - 3/10 = 7/10 = 0.7
MCQ
Creation of NumPy arrays
Consider the following array.
import numpy as np
Arr1 = np.arange( 7, 63, 9)
Which of the following numbers are part of Arr1?
a. 16
b. 26
c. 25
d. 63
Question Name Creation of numpy arrays
Right answer Option a, c
Correct Answer Correct! np.arange() creates an array of integers defined by
Feedback parameters given. In this case the output would be:
Arr1 = array([7, 16, 25, 32, 41, 50, 59])
MCQ
Seaborn
Which of the following can be changed by using set_style from seaborn?
a. Background of the plot
b. Color of bins in dist plot
c. Color probability distribution curve in a dist plot
d. Number of bins in a dist plot
Question Name Seaborn
Right answer Options a, b, c
Correct Answer Correct! set_style is used to change only the aesthetic details.
Feedback
MCQ
Splitting a column
You are given data in which date is given in dd-mm-yyyy format. Which of the following code
snippets will help you in creating a month column within the existing data frame.
Note: More than one option might be correct. Assuming pd is an alias of Pandas
a. df[‘Month’] = df[‘date’].apply(lambda x: x.split(‘-’)[1])
b. df[‘Month’] = pd.DatetimeIndex(df[‘date’]).month()
c. df[‘Month’] = pd.DatetimeIndex(df[‘date’]).month
d. df[‘Month’] = pd.DateTimeIndex(df[‘Month’])
Question Name Splitting a column
Right answer Option (a)(c)
Correct Answer Correct! This can be done in two ways, one is by using split
Feedback function and the other is by using DatetimeIndex module in
Pandas
Code
Description
Write code to take an integer n as input and create an array and return an array of squares of
integers from 1 to n
Sample input: 3
Sample output: array([1, 4, 9])
Select the correct code to achieve this. Assuming np is an alias of NumPy
a. np.arange(n)**2
b. np.arange(0, n, 2)
c. np.arange(1, n+1)**2
d. np.linspace(1, n+1)**2
Question Name Creation of array
Right answer Option c
Correct Answer Correct! np.arange() creates an array of integers between the
Feedback specified limits. Lower limit is included and upper limit excluded
Code
Above Average
Description
You are given order details of a distribution firm. Assume that the data contains columns with OrderId,
Name, and DateofBirth columns. You can identify a unique customer by combining Name and
DateofBirth. Two customers can have the same name or date of Birth but not both. Write a code to
calculate the maximum number of orders placed by an unique customer and print the same. Assume df
is a defined dataframe.
Examples:
Input 1:
Output 1:
2
Solution code :
df[‘New’] = df[‘Name’] + ‘-’ + df[‘DateofBirth’]
print(df[‘New’].value_counts().max())
Question Name EDA
Right answer Option a
Correct Answer It is given that two customers can have the same name or date of
Feedback birth but not both. So, a new column created by combining both
will be a unique identifier for the customer. Find the number of
times each ‘New’ value will indicate how many times an unique
customer ordered.
-------------------------------------------------------------------------------------------------------------------------
Disclaimer: All content and material on the UpGrad website is copyrighted material, either
belonging to UpGrad or its bonafide contributors and is purely for the dissemination of
education. You are permitted to access print and download extracts from this site purely for your
own education only and on the following basis:
● You can download this document from the website for self-use only.
● Any copies of this document, in part or full, saved to disc or to any other storage medium may
only be used for subsequent, self-viewing purposes or to print an individual extract or copy for
non-commercial personal use only.
● Any further dissemination, distribution, reproduction, copying of the content of the document
herein or the uploading thereof on other websites or use of content for any other
commercial/unauthorized purposes in any way which could infringe the intellectual property
rights of UpGrad or its contributors, is strictly prohibited.
● No graphics, images or photographs from any accompanying text in this document will be
used separately for unauthorised purposes.
● No material in this document will be modified, adapted or altered in any way.
● No part of this document or UpGrad content may be reproduced or stored in any other web
site or included in any public or private electronic retrieval system or service without UpGrad’s
prior written permission.
● Any rights not expressly granted in these terms are reserved.