All Assignments
All Assignments
● MCQs - Multiple Choice Questions (a question has only one correct answer)
● MSQs
o Multiple Select Questions (a question can have two, three, or four correct options)
● True/ False - The learner has to choose either true or false from a given statement.
1 point
12
58
70
Error: Invalid operation, unsupported operator ‘+’ used between 'int' and 'str’
1 point
Given two variables j = 6 and g = 3.3. If both normal division and floor division operators were used to
divide j by g, what would be the data type of the value obtained from the operations?
int, int
float, float
float, int
int, float
Yes, the answer is correct.
Score: 1
Accepted Answers:
float, float
1 point
Let a = 5 (101 in binary) and b = 3 (011 in binary). Which of the following operations results in the values 7
and 1?
1 point
When using the floor division operator (//), if the result is negative, then the result is rounded off to the next
largest integer.
True
False
1 point
Let x = "50". Which of the following commands converts the ‘x’ to float datatype?
str(float,x)
x.float()
float(x)
Cannot convert a string to float datatype
1 point
1_variable
variable_1
variable_*
variable1
variable_*
1 point
var1=True; var2=False;
var1=false; var2=true;
var1='True'; var2='False';
var1='true'; var2='false';
1 point
Predict the output of the following code
4.0
4.1
1 point
The value of the variable result after running the code snippet below is ____
89.0
17.0
737.0
96.0
1 point
Which Python library is commonly used for data wrangling and manipulation?
Numpy
Pandas
scikit
Math
Note : This assignment is only for practice purpose and it will not be counted towards the Final
score
1 point
.ram2
ram.2
ram_2
2ram00
1 point
m_n_q = 3500
mnq = 350036003700
1 point
==
>>
<-
1 point
Which command would you use to find the data type of a variable
data( )
type( )
typeof( )
str( )
1 point
What will be the output after the following statements are executed?
X=300
Y= 17
X%=Y
print(X)
11
17.6
300
17
Week 2 : Assignment 2
Assignment submitted on 2022-08-10, 22:50 IST
Types of questions:
● MCQs - Multiple Choice Questions (a question has only one correct answer)
● MSQs –
o Multiple Select Questions (a question can have two, three or four correct options)
1 point
Which of the following function(s) can be used to resize a NumPy array in Python from the given options.
array.shape(reshape)
array.reshape(shape)
numpy.reshape(array, shape)
numpy.reshape(shape, array)
Partially Correct.
Score: 0.5
Accepted Answers:
array.reshape(shape)
numpy.reshape(array, shape)
1 point
tuple_1 = (1,5,6,7,8)
tuple_2 = (8,9,4)
Identify which of the following options does not work on the given tuples
sum(tuple_1)
len(tuple_2)
tuple_2 + tuple_1
tuple_1[3] = 45
0 points
Create a sequence of numbers from 15 to 25 and increment by 4. What is the index of the element 19?
1 point
Consider a variable job = "chemist". Which of the following expression(s) will retrieve the last character
from the string?
job[7]
job[len(job) - 1]
job[5:6]
job[- 1]
job[- 1]
1 point
1 point
Which of the following data structure(s) can be used as a key while creating a dictionary?
list
str
set
None
Partially Correct.
Score: 0.5
Accepted Answers:
str
None
1 point
Given a dictionary, states = {'Tamil Nadu': 'TN', 'Karnataka': 'KA', 'Kerala': 'KL', 'Maharashtra': 'MH'},
which of the following command(s) is used to remove the key-value pair 'Karnataka': 'KA' from it?
del states[‘Karnataka’]
states.popitem(‘Karnataka’)
states.pop(‘Karnataka’)
del states[‘Karnataka’:’KA’]
states.pop(‘Karnataka’)
1 point
“Shin’ichi”
‘Shin”ichi’
‘Shin’ichi’
1 point
np.array()
np.zeros()
np.empty()
1 point
Given a NumPy array, arr = np.array([[5,9,10], [7,2,6], [12,8,0]]), find the correct command from the
following options to get an output array as [24 15 20]?
np.sum(arr)
np.sum(arr, axis = 0)
np.sum(arr, axis = 1)
None of the above
Note : This assignment is only for practice purpose and it will not be counted towards the Final
score
1 point
a.upper( )
a.lower( )
a.string( )
a.title( )
1 point
The command to add “Notebook” as the first element inside the first level of the list “Stationery” is:-
Stationery[0].append('Notebook')
Stationery[0].insert(0,'Notebook')
Stationery[0][1] = "Notebook"
Stationery[0].extend('Notebook')
1 point
discard( )
clear( )
delete()
1 point
Mylist =[‘a’, ‘a’, ‘b’, ‘b’, ‘b’, ‘c’, ‘c’, ‘d’, ‘e’]
1 point
list
dictionary
tuple
array
Week 3 : Assignment 3
The due date for submitting this assignment has passed.
● MCQs - Multiple Choice Questions (a question has only one correct answer)
● MSQs –
● Multiple Select Questions (a question can have two, three or four correct options)
1 point
Choose the appropriate command(s) to filter those booking details whose reservation_status are a No-
show?
1 point
From the same data, find how many bookings were not canceled in the year 2017?
9064
6231
9046
1 point
From the total bookings that were made in 2017 and not canceled, which month had the highest number
of repeated guests?
July
February
January
Read the 'flavors_of_cocoa.csv’ file as a dataframe ‘dt_cocoa’ and answer questions 4-7.
1 point
Which of the following commands can be used to create a variable Flag, and set the values
as Premium when the rating is equal to or greater than 3.25, and otherwise as Regular?
1 point
Which instruction can be used to impute the missing values in the column Review Data from the
dataframe dt_cocoa by grouping the records company – wise?
1 point
After checking the data summary, which feature requires a data conversion considering the data values
held?
Rating
Review Date
Company
1 point
What is the maximum average rating for the cocoa companies based out of Guatemala?
3.5
3.42
1 point
pd.merge()
pd.concat()
join()
1 point
Of the following set of statements, which of them can be used to extract the column Direction as a
separate dataframe?
A file “Students.csv” contains the attendance and scores of three separate students. This dataset is
loaded into a dataframe df_study and a cross table is obtained from the same dataframe which results in
the following output
Which one of these students’ average score across all subjects was the lowest? Which subject has the
highest average score across students?
Harini, Maths
Sathi, Maths
Harini, Physics
Rekha, Maths
Note : This assignment is only for practice purpose and it will not be counted towards the Final
score
1 point
Which of the following can be inferred from scatter plot of ‘mpg’ (Miles per gallon) vs ‘wt’ (Weight of car)
from the dataset mtcars.csv?
1 point
Plot a boxplot for “price” vs “cut” from the dataset “diamond.csv”. Which of the categories
under “cut” have the highest median price?
Good
Ver Good
Premium
Fair
1 point
In the churn.csv dataframe, what are the total no. of missing values for the variable TotalCharges?
10
23
15
1 point
The command used for line plot from the package Matplotlib?
plot( )
line( )
join( )
plt( )
1 point
The probability of two different events occurring at the same time is known as
Marginal probability
Conditional probability
Joint probability
The power consumption of an individual house in a residential complex has been recorded for the previous
year. This data is analysed to predict the power consumption for the next year. Under which type of
machine learning problem does this fall under?
Classification
Regression
Reinforcement Learning
1 point
A dataset contains data collected by the Tamil Nadu Pollution Control Board on environmental conditions
(154 variables) from one of their monitoring stations. This data is further analyzed to understand the most
significant factors that affect the Air Quality Index. The predictive algorithm that can be used in this situation
is ___________.
Logistic Regression
1 point
A regression model with the following function y = 60 + 5.2x was built to understand the impact of humidity
(x) on rainfall (y). The humidity this week is 30 more than the previous week. What is the predicted
difference in rainfall?
156 mm
15.6 mm
-156 mm
None of the above
Read the information given below and answer the questions from 4 to 7:
Data Description:
An automotive service chain is launching its new grand service station this weekend. They offer to
service a wide variety of cars. The current capacity of the station is to check 315 cars thoroughly per
day. As an inaugural offer, they claim to freely check all cars that arrive on their launch day, and
Unexpectedly, they get 450 cars. The servicemen will not work longer than the working hours, but
Can you save the day for the new service station?
He has been given a data set, ‘ServiceTrain.csv’ that contains some attributes of the car that can be
Now for the cars they cannot check in detail, they measure those attributes and store them in
‘ServiceTest.csv’
Problem Statement:
Use machine learning techniques to identify whether the cars require service or not
Read the given datasets ‘ServiceTrain.csv’ and ‘ServiceTest.csv’ as train_data and test_data
respectively and import all the required packages for analysis.
1 point
Which of the following machine learning techniques would NOT be appropriate to solve the problem given
in the problem statement?
kNN
Random Forest
Logistic Regression
Linear regression
1 point
The plot shown below denotes the percentage distribution of the target column values within
the train_data dataframe. Which of the following options are correct?
● Encode categorical variable, Service - Yes as 1 and No as 0 for both the train and test datasets
● Split the set of independent features and the dependent feature on both the train and test datasets
1 point
After applying logistic regression, what is/are the correct observations from the resultant confusion matrix?
1 point
The logistic regression model built between the input and output variables is checked for its prediction
accuracy of the test data. What is the accuracy range (in %) of the predictions made over test data?
60 - 79
90 - 95
30 – 59
80 – 89
1 point
Standardization
Dummy variables
Correlation
a. The Global Happiness Index report contains the Happiness Score data with multiple features
(namely the Economy, Family, Health, and Freedom) that could affect the target variable value.
Prepare the data by following the steps given below, and answer question 9
Split the set of independent features and the dependent feature on the given dataset
Create training and testing data from the set of independent features and dependent
feature by splitting the original data in the ratio 3:1 respectively, and set the value
for random_state of the training/test split method’s instance as 1
1 point
A multiple linear regression model is built on the Global Happiness Index dataset “GHI_Report.csv”. What
is the RMSE of the baseline model?
2.00
0.50
1.06
0.75
1 point
X and Y are two variables that have a strong linear relationship. Which of the following statements are
incorrect?
One variable may or may not cause a change in the other variable.
Note : This assignment is only for practice purpose and it will not be counted towards the Final
score
1 point
Which of the following functions can be used to split the data into train and test?
pandas.train_test_split( )
numpy.train_test_split( )
sklearn.model_selection.train_test_split( )
sklearn.train_test_split( )
1 point
sklearn.KNN
sklearn.KNearestClassifier
sklearn.neighbors.KNeighborsClassifier( )
sklearn.neighbors.KNeighborsRegressor( )
1 point
A Linear Regression model is said to be good when the R-squared value tends to
-1
0.5
1 point
0 to 1
-1 to 0
-1 to 1
●MCQs - Multiple Choice Questions (a question has only one correct answer)
●MSQs –
o Multiple Select Questions (a question can have two, three or four correct options)
o In this case, equal weightage must be given to all options
●True/ False - The learner has to choose either true or false from a given statement.
1 point
Which of the following statement(s) is/are TRUE?
Coimbatore
Thrissur
Kannur
Mumbai
Yes, the answer is correct.
Score: 1
Accepted Answers:
Mumbai
1 point
During which year did West Bengal have the highest crop production?
2013
2007
1997
2006
Yes, the answer is correct.
Score: 1
Accepted Answers:
2007
1 point
Which state in India has the second highest crop production? (Overall, for all years)
Andhra Pradesh
Tamil Nadu
Kerala
Uttar Pradesh
Yes, the answer is correct.
Score: 1
Accepted Answers:
Tamil Nadu
1 point
How are the variables Area and Production correlated?
17,065,810.29 (approx.)
50,857.44 (approx.)
242,361.35 (approx.)
621,031.95 (approx.)
Yes, the answer is correct.
Score: 1
Accepted Answers:
621,031.95 (approx.)
1 point
What is the standard deviation of production?
17,497,558.29 (approx.)
50,857.44 (approx.)
242,361.35 (approx.)
582,503.45 (approx.)
Yes, the answer is correct.
Score: 1
Accepted Answers:
17,497,558.29 (approx.)
1 point
Due to some unknown reasons, the crop production for only two states was recorded for 2015. Which
states are they?
I - True, II - False
I - False, II - True
I - False, II - False
I - True, II - True
No, the answer is incorrect.
Score: 0
Accepted Answers:
I - True, II - False
1 point
Which year has the lowest crop production?
2011
2010
2015
2009
Yes, the answer is correct.
Score: 1
Accepted Answers:
2015
1 point
The crop that Maharashtra produced the most is ________
Sugarcane
Rice
Banana
Coconut
Yes, the answer is correct.
Score: 1
Accepted Answers:
Sugarcane
1 point
What does the R-squared value calculated for the model built signify?
14708129.51738 (approx)
18962432.76753 (approx)
14718129.43235968 (approx)
14708029.87934857 (approx)
No, the answer is incorrect.
Score: 0
Accepted Answers:
18962432.76753 (approx)
Session 2 - Sep 16 (8 PM to 11
PM )
The due date for submitting this assignment has passed.
●MCQs - Multiple Choice Questions (a question has only one correct answer)
●MSQs –
o Multiple Select Questions (a question can have two, three or four correct options)
o In this case, equal weightage must be given to all options
●True/ False - The learner has to choose either true or false from a given statement.
1 point
Which of these crops are produced during the Summer season? (select option with all that apply)
1 point
During which year did Haryana have the highest crop production?
2013
2011
1997
2008
1 point
The maximum and minimum area for production were in the years?
1 point
Which state in India had the second lowest crop production? (overall, for all years)
Meghalaya
Chandigarh
Mizoram
Manipur
1 point
What were the top three produced crops in the year 2012?
1 point
52957.44 (approx.)
12167.42 (approx.)
49177.60 (approx.)
48848.27 (approx.)
1 point
Which is the crop that gave the highest production to the state of Andhra Pradesh?
Sugarcane
Wheat
Banana
Coconut
1 point
1 point
Puducherry
Chandigarh
Kerala
Goa
1 point
17065.81 (approx.)
12035.39 (approx.)
11868.49 (approx.)
58250.34 (approx.)
No, the answer is incorrect.
Score: 0
Accepted Answers:
12035.39 (approx.)
1 point
37.686
0.37686
3.7686
0.037686
1 point
The crops that had the highest production (in the correct order) were?
1 point
Which is the only crop that has the highest production during autumn, summer, and winter?
Rice
Maize
Paddy
Jute
●Split the data into the train (70%) and test (30%) sets, and set the random state for the train-test
split instance as 42
Build a linear regression model using the training dataset by having “Area” as the independent variable and
“Production” as the dependent variable. Using the model that has been built, answer the following
question.
1 point
13850999.74575 (approx)
1001531.33109 (approx)
13524820.12533 (approx)
14599645.26554 (approx)
1 point
18529629.51147 (approx)
827676.37303 (approx)
13524820.12533 (approx)
112599645.26554 (approx)