Advanced DS With Python Question Paper NASSCOM (1)
Advanced DS With Python Question Paper NASSCOM (1)
1.) Assume that you are a software developer and you are applying for a job at XYZ company. The job
description says that developers with years of experience between 3 to 20 can only apply for the
particular designation.
What is the conditional statement to subscribe the candidates for the job based on their years of
experience in relation with the above given requirements in Python?
2.) Which of the following cannot be used as an identifier in Python Programming Language?
1. nonlocal_
2. _nonlocal_
3. nonlocal
4. nonlocal_1
3.) Which of the following value has complex data type in python?
1. 54J+h
2. 54o
3. 56j
4. 52J*j
4.) Consider a developer was developing a program using python. In that program the developer is
displaying the square of even numbers within a given number range. The range starts with 78 ends with
89. The number 89 should also be processed in the program.
1. For i in 78.90:
if (%2 = = 0);
print(“”2)
else
print(i)
2. For i in range (78, 89)
if (%2 = = 0);
print(i”2)
else
print(i)
3. For i in range (78, 90)
if (%2 = = 0);
print(i”2)
else
print(i)
4. For i in range (78, 89)
if (%2 = = 0);
print(i”2)
else
print(i)
5.) A developer was creating a python code. In that python code, the developer wants to create a
method “Time _convert” to convert a given input number into hours and minutes.
What is the code statement in python to define the method “Time convert” with the above given
requirements?
6.) Consider the student is working on a python in that program. In that program, the student has to
display the all elements stored of an array. Refer the array details.
Blue
Green
Pink
Black
Yellow
What is the code snippet to execute the program based on the above given scenario?
1. for c= color
print(c)
2. for c as color
print(c)
3. for c = color
print(c)
4. for c in color
print(c)
7.) Which of the following is the web framework is used to develop an application server quickly using
python programming language?
1. .NET
2. Spring
3. Flask
4. Node PY
What is the code statement in python to convert the given string into upper case and display the result
by removing the extra while space in the front and back of the string?
1. print(String_str.remove(), ConvertToUpper())
2. print(String_str.remove(),upper())
3. print(strip(string_str), ConvertToUpper(String_str))
4. print(String_str.strip().Upper())
“Dog”
“Cat”
“Lion”
“Tiger”
Which of the following data type is used to store the above given data in a single variable and the
elements are scrambled when displayed?
1. Dictionary
2. Set
3. List
4. Tufle
10.) Consider a student is developing a program using Python. The Program build displays the various
arithmetic operators available in Python. Refer the given variable ‘X’.
X = 78
Which of the following operator is used to find the cube of the value stored in the variable ‘X’?
1. X//3
2. 3**X
3. X**3
4. X—3
Block 1:
class Person:
Block 2:
def myfunc(self):
print(“Name” + self.name)
Block 3:
Block 4:
p1 = Person(“Jacob”, 34)
p1.myfunc()
1. Class Person:
p1 = Person(“Jacob”,34)
p1.myfunc)
def myfunc(self);
Print(“Name” self.name)
def myfunc(self);
print(“Name”+self.name)
p1 = Person(“Jacob”, 34)
p1.myfunc()
3.
Module – Python; Topic – OOPs
MODULE: 2
Column A Colum B
shape Finds Variable Correlations
head() Details of Missing value
describe() Display all Columns and rows
info() Display Top five rows
corr() View Statistical summary of data
1.)
2.)
3.)
4.)
2.) Consider a developer has collected some data. In order to understand more about the collected
data, the developer wants to analyse the collected data. The developer is using descriptive statistics to
analyse the data.
In Descriptive statistics, Univariate analysis is done in order to analyse a particular variable
What are the measures that are used to perform a univariate analysis in descriptive statistics?
3.) Consider to table with columns “x” and “z”. Which of the following library in python is used to find
the correlations between the columns “x” and “z”?
1.) NumPy
2.) SciPy
3.) Pandas
4.) TensorFlow
1.) Vchfguj
2.) Chfhy
3.) Vhcfhc
4.) Vchch
What are the code statements to import the required library and the draw the plot given in the above
scenario in python?
6.) What is the command statement to install the powerful numerical processing library in Juypter
python?
7.) A financial department employee was computing some financial data of ZYX company. Refer the
data attained by the financial department employee.
Employee1 = 1,00,000
Employee2 = 3,00,000
Employee3 = 2,00,000
What is the LPA central value based on the given LPA of three employees working in a company ZYX?
1. 300000
2. 100000
3. 200000
4. 150000
1.) A student was working on Central Limit Theorem, while learning Data Science. In the central Limit
Theorem an interval estimate can be created.
Which of the following value is used to estimate the confidence level while computing the interval
estimation?
1. Mean
2. z-score
3. c-score
4. t-score
2.) Consider a student wants to conduct a study to know the average count of apple iPhone users in
India. Because of time and cost constraint the student can perform the study on only people 15,000
people. So the sample population of the study is 15,000.
What is the symbol that can be used to represent the mean of the total population and the sample
population?
1. µ, X_
2. µ,
3. $,µ
4. µ, X
3.) Observe the Given plot whose width is defined using standard deviation :
In data science, which of the following symmetric plot of data is plotted in the given image?
1. Uniform Distribution
2. Gaussian distribution
3. Bernoulli Distribution
4. Binomial distribution
4.) Which of the following Probability distribution can be computed using a discrete random variable?
1. Uniform Distribution
2. Plot Distribution
3. Bernoulli Distribution
4. Normal Distribution
5.) Which of the following study in data science has to be undertaken to know the uncertainty that may
occur while working with data?
1. Occurance
2. Chi square
3. Probability
4. Plot
1.) Assume a client is working on the artificial intelligence and machine learning. The client is also
exploring all the algorithms in machine learning to understand which type of algorithm has to be applied
on the data that has been collected.
Which of the following is an iterative algorithm in machine learning that can be used to optimize a
function?
1. Gradient Descent
2. Decision tree
3. Logistic regression
4. KNN algorithm
2.) Consider a data science student was working with the artificial intelligence and machine learning.
The student has collected few data and is looking for the appropriate machine language technique to
work on the data.
Which following Machine Learning technique is applied if the data collected consists of a target
variable?
3.) Consider a developer was collecting some data. The developer wants to perform a supervised
machine learning technique to solve the classification problems, Based on the collected data, the
developer is opting for the Decision tree algorithm.
To work with this machine learning algorithm the developer has located the data and the test train
x_train and y_train are created.
What is the code snipped in machine learning to fit on the given x_train and y_train in Decision tree?
4.) Consider a developer was collecting some students data in a CSV format in “data.csv” file. After the
collection of data the developer wants to apply the K Nearest Neighbour algorithm of machine learning
to solve the classification problems of the collect data. In order to perform the algorithm, the data is
loaded using python pandas.
What is the code statement to identify the input data in the data frame ‘df’ which is created by reading
the file “data csv” using python pandas?
1. df.{[‘Age’,[Height’],[‘Weight’],[‘BMI’]}
2. df{[‘Age’,’Height’,’Weight’,’BMI’]}
3. df.[‘Age’,’Height’,’Weight’,BMI’]
4. df{[Age],Height,[Weight,BMI]}
5.) Consider a developer is collecting the details of 30,000 Airtel customers. This data is collected along
with the details like Customer name, address, connection number, Internet plan adopted, Start and end
date of the plan, monthly Payment of the plan, Due date, Payment paid dates, penalty amounts and
default payment as per prediction. All these data are stored in a file “dat.csv” as the data are in CSV
format.
a) What is the code snipped to load the csv data in machine learning and the code statement that
is used to find the number of defaulters based on the given data using python?
b) What is the code statement in python to import the package necessary to build a stacking
ensemble model?
1. a.) Import pandas as pd
df = pd.read_csv(‘data.csv’)
df[‘defaulted’].value_counts(normalize = True)
6.) Consider a developer is working with machine learning. A machine learning requires a major
mathematical skill which is linear algebra. Many machine learning language data set are in the form of
Matrix.
Which of the following study cannot be defined using linear algebra that is the mathematical foundation
for machine learning?
1. Dot Product
2. Vectors
3. Mapping
4. Schemes
Module: 5
1.) Tokens (words) are generated in the process. “Bag of words”, after preprocessing multiple sentences
in the dataset. What are those tokens used for?
1. Calculating the frequency of each token.
2. Calculating the importance of each token.
3. Calculating the usability of each token
4. Calculating the total number of tokens.
2.) When purchasing a phone online, the website includes a picture of the phone, its features, and user
reviews, Which pipeline in deep learning handles the picture portion?
4.) Consider that there is a picture, and the picture’s edges and boundaries need to be determined
using the edge detection method. What will be the initial task to be performed?
5.) What happens when there’s a negligible change in the node weights in a neural network?
6.) The data has been preprocessed, and natural language understanding has been applied to the
preprocessed data. What happens in the next stage of natural language processing (NLP)?
7.) In the given image, the most prominent features of the feature map are select. What is the image 2
called as?