0% found this document useful (0 votes)
4 views74 pages

Machine Learning and Deep Learning Concepts

The document consists of multiple assignments related to machine learning and deep learning concepts, covering topics such as regression, classification, clustering, and neural networks. It includes questions on performance metrics, data preprocessing, model evaluation, and various algorithms used in machine learning. Each question has a correct answer indicated, along with the score achieved for each assignment.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views74 pages

Machine Learning and Deep Learning Concepts

The document consists of multiple assignments related to machine learning and deep learning concepts, covering topics such as regression, classification, clustering, and neural networks. It includes questions on performance metrics, data preprocessing, model evaluation, and various algorithms used in machine learning. Each question has a correct answer indicated, along with the score achieved for each assignment.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Assignment submitted on 2025-10-06, 11:41 IST

1 point
The California housing price prediction problem is an example of:

Classification
Clustering
Regression
Reinforcement Learning
Yes, the answer is correct.
Score: 1
Accepted Answers:
Regression
1 point
Which performance metric is commonly used for regression problems?

Precision
Recall
Root Mean Squared Error
F1 Score
Yes, the answer is correct.
Score: 1
Accepted Answers:
Root Mean Squared Error
1 point
In traditional machine learning, what is the typical ratio for splitting a dataset into training
and testing sets?

40%–60%
50%–50%
80%–20%
55%–45%
Yes, the answer is correct.
Score: 1
Accepted Answers:
80%–20%
1 point
Which scikit-learn function is used for splitting datasets?

split_dataset()
data_split()
train_test_split()
dataset_partition()
Yes, the answer is correct.
Score: 1
Accepted Answers:
train_test_split()
1 point
Min-max scaling transforms features to a range typically between:

-1 to 1
0 to 10
0 to 1
-5 to 5
Yes, the answer is correct.
Score: 1
Accepted Answers:
0 to 1
1 point
Which scaler in scikit-learn is used for standardization?

StandardScaler
MinMaxScaler
RobustScaler
NormalScaler
Yes, the answer is correct.
Score: 1
Accepted Answers:
StandardScaler
1 point
In a confusion matrix for binary classification, True Negative (TN) means:

Actual negative predicted as positive


Actual positive predicted as negative
Actual positive predicted as positive
Actual negative predicted as negative
No, the answer is incorrect.
Score: 0
Accepted Answers:
Actual negative predicted as negative
1 point
Micro-averaging in multi-class classification:

Averages precision and recall for each class


Considers total true positives, false positives, and false negatives
Considers each class separately
Ignores true negatives
Yes, the answer is correct.
Score: 1
Accepted Answers:
Considers total true positives, false positives, and false negatives
1 point
In sklearn, which metric is used to measure how often the classifier is correct?

precision_score
recall_score
accuracy_score
roc_auc_score
Yes, the answer is correct.
Score: 1
Accepted Answers:
accuracy_score
1 point
Which of the following is an ensemble method in scikit-learn?

KNN
SVM
Gradient Boosting
Logistic Regression
Yes, the answer is correct.
Score: 1
Accepted Answers:
Gradient Boosting
1 point
Popular sources to obtain datasets for machine learning projects include:

Kaggle
AWS datasets
UCI Machine Learning Repository
Data Visualization tools
Yes, the answer is correct.
Score: 1
Accepted Answers:
Kaggle
AWS datasets
UCI Machine Learning Repository
1 point
In an end-to-end machine learning project, key steps include:

Data loading
Data visualization
Model fine-tuning
Ignoring evaluation
Yes, the answer is correct.
Score: 1
Accepted Answers:
Data loading
Data visualization
Model fine-tuning
1 point
Scikit-learn supports:

Supervised learning
Unsupervised learning
Dimensionality reduction
Image captioning
Yes, the answer is correct.
Score: 1
Accepted Answers:
Supervised learning
Unsupervised learning
Dimensionality reduction
1 point
For data cleaning, which techniques are available?

dropna()
fillna()
dropAll()
None of these
Yes, the answer is correct.
Score: 1
Accepted Answers:
dropna()
fillna()
1 point
Components of a typical dataset include:

Features
Response
Model
Hyperparameters
Yes, the answer is correct.
Score: 1
Accepted Answers:
Features
Response

Week 11 : Assignment 11

The due date for submitting this assignment has passed.

Due on 2025-10-08, 23:59 IST.


Assignment submitted on 2025-10-06, 11:33 IST
1 point

In deep learning, which technique adjusts the model weights based on the error?

Forward Propagation

Batch Normalization

Backpropagation

Clustering

Yes, the answer is correct.


Score: 1
Accepted Answers:
Backpropagation

1 point

Which library is commonly used for developing deep learning models?

NumPy

TensorFlow

Pandas

Matplotlib

Yes, the answer is correct.


Score: 1
Accepted Answers:
TensorFlow

1 point

In traditional image classification, each pixel of a grayscale image is considered:

Output

Label
Feature/Independent variable

Target variable

Yes, the answer is correct.


Score: 1
Accepted Answers:
Feature/Independent variable

1 point

CNNs are particularly good for:

Tabular data

Image and video processing

Time-series forecasting

Anomaly detection

Yes, the answer is correct.


Score: 1
Accepted Answers:
Image and video processing

1 point

In CNNs, the layer that helps reduce spatial dimensions is called:

Convolutional layer

Pooling layer

Fully connected layer

Normalization layer

Yes, the answer is correct.


Score: 1
Accepted Answers:
Pooling layer
1 point

In the traditional approach to text classification, which method is often used?

Image Embedding

Bag of Words

Word Augmentation

Principal Component Analysis

Yes, the answer is correct.


Score: 1
Accepted Answers:
Bag of Words

1 point

RNNs are particularly useful for:

Tabular datasets

Sequential data

Image classification

Data visualization

Yes, the answer is correct.


Score: 1
Accepted Answers:
Sequential data

1 point

Which preprocessing step converts text into tokens?

Normalization

Tokenization
Padding

Vectorization

Yes, the answer is correct.


Score: 1
Accepted Answers:
Tokenization

1 point

What is the major advantage of using CNNs over traditional image classification methods?

Manual feature extraction is better

Automatically learn spatial hierarchies

Require less data

Only for black-and-white images

Yes, the answer is correct.


Score: 1
Accepted Answers:
Automatically learn spatial hierarchies

1 point

In text classification, Word Embedding is created to:

Increase dataset size

Map words into numerical vectors

Perform clustering

Select best features

Yes, the answer is correct.


Score: 1
Accepted Answers:
Map words into numerical vectors
1 point

Applications of Deep Learning include:

Computer Vision

Speech Recognition

Natural Language Processing

Decision Trees

Yes, the answer is correct.


Score: 1
Accepted Answers:
Computer Vision

Speech Recognition

Natural Language Processing

1 point

Key components of a CNN include:

Convolutional Layer

Pooling Layer

Flatten Layer

RNN Layer

Yes, the answer is correct.


Score: 1
Accepted Answers:
Convolutional Layer

Pooling Layer

Flatten Layer

1 point
RNN types include:

One-to-one

One-to-many

Many-to-one

Many-to-many

Yes, the answer is correct.


Score: 1
Accepted Answers:
One-to-one

One-to-many

Many-to-one

Many-to-many

1 point

Deep Learning differs from traditional Machine Learning in terms of:

Data requirements

Need for Feature Engineering

Interpretability

Model complexity

Yes, the answer is correct.


Score: 1
Accepted Answers:
Data requirements

Need for Feature Engineering

Interpretability

Model complexity
1 point

Preprocessing steps in text classification include:

Tokenization

Padding

Vectorization

Pooling

Yes, the answer is correct.


Score: 1
Accepted Answers:
Tokenization

Padding

Vectorization

Week 10 : Assignment 10

The due date for submitting this assignment has passed.

Due on 2025-10-01, 23:59 IST.

Assignment submitted on 2025-09-22, 12:52 IST


1 point

In hierarchical clustering, initially each data point is considered as:

A class

A cluster

A centroid

A noise
Yes, the answer is correct.
Score: 1
Accepted Answers:
A cluster

1 point

Which of the following is NOT a type of unsupervised learning task?

Clustering

Anomaly Detection

Classification

None of these

Yes, the answer is correct.


Score: 1
Accepted Answers:
Classification

1 point

In K-means clustering, the K refers to:

Number of clusters

Number of features

Number of classes

Number of models

Yes, the answer is correct.


Score: 1
Accepted Answers:
Number of clusters

1 point
Which linkage method in hierarchical clustering considers the closest points between
clusters?

Complete linkage

Average linkage

Single linkage

Centroid linkage

Yes, the answer is correct.


Score: 1
Accepted Answers:
Single linkage

1 point

What happens if the learning rate in an ANN is too high?

Very slow training

Algorithm overshoots minimum

Perfect convergence

Underfitting

Yes, the answer is correct.


Score: 1
Accepted Answers:
Algorithm overshoots minimum

1 point

Overfitting means:

Good performance on testing data

Poor performance on training data

Good performance on training but poor on testing


Poor performance on both

Yes, the answer is correct.


Score: 1
Accepted Answers:
Good performance on training but poor on testing

1 point

Regularization is primarily used to:

Increase training accuracy

Reduce model complexity and prevent overfitting

Decrease learning rate

Increase testing error

Yes, the answer is correct.


Score: 1
Accepted Answers:
Reduce model complexity and prevent overfitting

1 point

In binary classification using ANN, which activation function is often used in the output layer?

ReLU

Sigmoid

Tanh

Softmax

Yes, the answer is correct.


Score: 1
Accepted Answers:
Sigmoid

1 point
Logistic Regression helps in:

Binary classification

Restricting output between 0 and 1

Regression for continuous variables

Drawing decision boundaries

Yes, the answer is correct.


Score: 1
Accepted Answers:
Binary classification

Restricting output between 0 and 1

Drawing decision boundaries

1 point

Which types of activation functions are commonly used in neural networks?

Linear

Sigmoid

Tanh

None of these

Partially Correct.
Score: 0.67
Accepted Answers:
Linear

Sigmoid

Tanh

1 point

In unsupervised learning, tasks include:


Clustering

Association Rule Mining

Anomaly Detection

Classification

Yes, the answer is correct.


Score: 1
Accepted Answers:
Clustering

Association Rule Mining

Anomaly Detection

1 point

Hyperparameters of a learning model include:

Learning Rate

Number of Hidden Layers

Maximum Iterations

Model Weights

Yes, the answer is correct.


Score: 1
Accepted Answers:
Learning Rate

Number of Hidden Layers

Maximum Iterations

1 point

Regularization techniques include:

L1 Regularization
L2 Regularization

Cross-validation

Dropout

Yes, the answer is correct.


Score: 1
Accepted Answers:
L1 Regularization

L2 Regularization

Dropout

1 point

Cluster similarity measures in hierarchical clustering include:

Single linkage

Complete linkage

Centroid

Regression Line fitting

Yes, the answer is correct.


Score: 1
Accepted Answers:
Single linkage

Complete linkage

Centroid

1 point

Desired characteristics of a good model include:

Neither underfitting nor overfitting

Good performance on validation set


Memorizing all training data

Generalizing well to unseen data

Yes, the answer is correct.


Score: 1
Accepted Answers:
Neither underfitting nor overfitting

Good performance on validation set

Generalizing well to unseen data

Week 9 : Assignment 9

The due date for submitting this assignment has passed.

Due on 2025-09-24, 23:59 IST.

Assignment submitted on 2025-09-15, 21:20 IST


1 point

In KNN, the class of a new point is decided based on:

Weighted average

Median

Majority of k nearest neighbors

Mode of the entire dataset

Yes, the answer is correct.


Score: 1
Accepted Answers:
Majority of k nearest neighbors

1 point

Which distance metric is most commonly used in KNN?

Manhattan distance
Euclidean distance

Cosine similarity

Hamming distance

Yes, the answer is correct.


Score: 1
Accepted Answers:
Euclidean distance

1 point

In Decision Trees, lower entropy implies:

Higher randomness

Better classification ability

Poor attribute relevance

Poor accuracy

Yes, the answer is correct.


Score: 1
Accepted Answers:
Better classification ability

1 point

What is used to measure the 'goodness' of an attribute in a Decision Tree?

Mean Squared Error

Confusion Matrix

Entropy

Standard Deviation

Yes, the answer is correct.


Score: 1
Accepted Answers:
Entropy

1 point

What is the formula for accuracy in classification?

(TP + FN) / (Total)

(TN + FP) / (Total)

(TP + TN) / (Total)

(FP + FN) / (Total)

Yes, the answer is correct.


Score: 1
Accepted Answers:
(TP + TN) / (Total)

1 point

Which of the following is a performance metric for regression?

Confusion Matrix

Precision

Mean Squared Error

Recall

Yes, the answer is correct.


Score: 1
Accepted Answers:
Mean Squared Error

1 point

What does R-squared (R²) represent?

Total error
Proportion of variance explained by the model

Average precision

Number of trees

Yes, the answer is correct.


Score: 1
Accepted Answers:
Proportion of variance explained by the model

1 point

In Gradient Descent, a too high learning rate may cause:

Slow convergence

No convergence

Very small steps

Underfitting

Yes, the answer is correct.


Score: 1
Accepted Answers:
No convergence

1 point

Polynomial Regression is used when:

The data follows a straight line

Data shows a nonlinear relationship

There is only one feature

Regression is not required

Yes, the answer is correct.


Score: 1
Accepted Answers:
Data shows a nonlinear relationship

1 point

In a confusion matrix, True Positive (TP) means:

Actual positive predicted as negative

Actual positive predicted as positive

Actual negative predicted as positive

Actual negative predicted as negative

Yes, the answer is correct.


Score: 1
Accepted Answers:
Actual positive predicted as positive

1 point

Which are types of supervised learning tasks?

Regression

Classification

Clustering

Reinforcement Learning

Yes, the answer is correct.


Score: 1
Accepted Answers:
Regression

Classification

1 point

Which measures can be used for attribute selection in Decision Trees?


Entropy

Information Gain

Gini Index

R-squared

Yes, the answer is correct.


Score: 1
Accepted Answers:
Entropy

Information Gain

Gini Index

1 point

In KNN, performance may vary based on:

Value of k

Distance metric used

Size of the training set

None of these

Yes, the answer is correct.


Score: 1
Accepted Answers:
Value of k

Distance metric used

Size of the training set

1 point

Error measures used for regression models are:

Mean Absolute Error (MAE)


Mean Squared Error( MSE)

Root Mean Squared Error (RMSE)

F1-Score

Yes, the answer is correct.


Score: 1
Accepted Answers:
Mean Absolute Error (MAE)

Mean Squared Error( MSE)

Root Mean Squared Error (RMSE)

1 point

Confusion Matrix contains:

True Positive

False Positive

False Negative

True Negative

Yes, the answer is correct.


Score: 1
Accepted Answers:
True Positive

False Positive

False Negative

True Negative

Week 8 : Assignment 8

The due date for submitting this assignment has passed.

Due on 2025-09-17, 23:59 IST.


Assignment submitted on 2025-09-07, 11:31 IST
1 point

In handling missing values, which method replaces missing entries with the median of the
column?

dropna

drop

fillna(median)

fillna(0)

Yes, the answer is correct.


Score: 1
Accepted Answers:
fillna(median)

1 point

Which Scikit-learn class is used for Min-max scaling?

StandardScaler

KBinsDiscretizer

OneHotEncoder

MinMaxScaler

Yes, the answer is correct.


Score: 1
Accepted Answers:
MinMaxScaler

1 point

What does SMOTE primarily do in class imbalance handling?

Undersample majority class


Oversample minority class with duplication

Create synthetic samples for minority class

Remove outliers from the minority class

Yes, the answer is correct.


Score: 1
Accepted Answers:
Create synthetic samples for minority class

1 point

In standardization, each feature has:

Mean = 1 and Standard deviation = 0

Mean = 0 and Standard deviation = 1

Mean = 0 and Standard deviation = 0

Mean = 1 and Standard deviation = 1

Yes, the answer is correct.


Score: 1
Accepted Answers:
Mean = 0 and Standard deviation = 1

1 point

In the standard Min-max scaling, the values are shifted to a range of:

-1 to 1

0 to 10

0 to 1

-5 to 5

Yes, the answer is correct.


Score: 1
Accepted Answers:
0 to 1

1 point

What method in Scikit-learn is used to split a dataset into training and testing parts?

train_test_split

train_split

test_train_split

dataset_split

Yes, the answer is correct.


Score: 1
Accepted Answers:
train_test_split

1 point

Which of the following is NOT a property of Scikit-learn?

Cross-validation

Feature selection

Image generation

Dimensionality reduction

Yes, the answer is correct.


Score: 1
Accepted Answers:
Image generation

1 point

What is the purpose of the `OneHotEncoder`?

Normalize continuous values


Discretize features

Convert categorical data into binary vectors

Standardize numerical attributes

Yes, the answer is correct.


Score: 1
Accepted Answers:
Convert categorical data into binary vectors

1 point

Which technique is used for discretization in Scikit-learn?

StandardScaler

MinMaxScaler

KBinsDiscretizer

OneHotEncoder

Yes, the answer is correct.


Score: 1
Accepted Answers:
KBinsDiscretizer

1 point

In sklearn, which evaluation metric measures the balance between precision and recall?

Accuracy

Recall

F1 Score

ROC-AUC

Yes, the answer is correct.


Score: 1
Accepted Answers:
F1 Score

1 point

In a dataset, 'features' are also known as:

Labels

Inputs

Outputs

Responses

Yes, the answer is correct.


Score: 1
Accepted Answers:
Inputs

1 point

Which of the following are ways to handle missing data?

Drop the attribute

Fill with mean/median

Over-sample missing entries

Drop the corresponding record

Yes, the answer is correct.


Score: 1
Accepted Answers:
Drop the attribute

Fill with mean/median

Drop the corresponding record

1 point
What does Feature Scaling help with?

Makes the attributes lie in the same range

Prevents domination of large-valued features

Improves model interpretability

Helps datasets grow in size

Yes, the answer is correct.


Score: 1
Accepted Answers:
Makes the attributes lie in the same range

Prevents domination of large-valued features

Improves model interpretability

1 point

Which are methods of feature scaling?

Normalization

Standardization

Min-max scaling

Stratification

Yes, the answer is correct.


Score: 1
Accepted Answers:
Normalization

Standardization

Min-max scaling

1 point

Properties of Scikit-learn include:


Supervised learning algorithms

Image editing tools

Cross-validation techniques

Dimensionality reduction

Yes, the answer is correct.


Score: 1
Accepted Answers:
Supervised learning algorithms

Cross-validation techniques

Dimensionality reduction

Week 7 : Assignment 7

The due date for submitting this assignment has passed.

Due on 2025-09-10, 23:59 IST.

Assignment submitted on 2025-09-02, 12:37 IST


1 point

Which function in Pandas is used to write a DataFrame to a CSV file?

to_csv()

save_csv()

write_csv()

export_csv()

Yes, the answer is correct.


Score: 1
Accepted Answers:
to_csv()
1 point

In pandas merge operation, which 'how' argument performs intersection of two DataFrames?

left

right

inner

outer

Yes, the answer is correct.


Score: 1
Accepted Answers:
inner

1 point

Which join includes all records from the left DataFrame and matching records from the right
DataFrame?

Right Join

Outer Join

Left Join

Inner Join

Yes, the answer is correct.


Score: 1
Accepted Answers:
Left Join

1 point

Which method is used for a full outer join in pandas?

merge(..., how='outer')

join(..., how='full')
combine(..., how='all')

outerjoin()

Yes, the answer is correct.


Score: 1
Accepted Answers:
merge(..., how='outer')

1 point

Which Python library is primarily used for creating visualizations?

NumPy

Pandas

PlotVisual

Seaborn

Yes, the answer is correct.


Score: 1
Accepted Answers:
Seaborn

1 point

Which plot in Seaborn is used for kernel density estimation?

histplot()

kdeplot()

scatterplot()

barplot()

Yes, the answer is correct.


Score: 1
Accepted Answers:
kdeplot()
1 point

Which plot is best for representing pairwise relationships in a dataset?

boxplot

heatmap

pairplot

violinplot

Yes, the answer is correct.


Score: 1
Accepted Answers:
pairplot

1 point

Which visualization represents a correlation matrix?

pairplot

barplot

heatmap

lineplot

Yes, the answer is correct.


Score: 1
Accepted Answers:
heatmap

1 point

Which Matplotlib function is used to plot histograms?

hist()

histplot()
plot()

kdeplot()

Yes, the answer is correct.


Score: 1
Accepted Answers:
hist()

1 point

Which type of plot displays the five-number summary (min, Q1, median, Q3, max)?

scatter plot

box plot

violin plot

histogram

Yes, the answer is correct.


Score: 1
Accepted Answers:
box plot

1 point

Which library is abbreviated as sklearn?

TensorFlow

PyTorch

Scikit-learn

NumPy

Yes, the answer is correct.


Score: 1
Accepted Answers:
Scikit-learn
1 point

Which sklearn module is used to split a dataset into training and testing sets?

model_selection

preprocessing

decomposition

metrics

Yes, the answer is correct.


Score: 1
Accepted Answers:
model_selection

1 point

Which sklearn model is used for K-Nearest Neighbors classification?

DecisionTreeClassifier

KNeighborsClassifier

RandomForestClassifier

LogisticRegression

Yes, the answer is correct.


Score: 1
Accepted Answers:
KNeighborsClassifier

1 point

Which method reduces the number of features in a dataset?

Feature Selection

Dimensionality Reduction
Model Evaluation

Preprocessing

Yes, the answer is correct.


Score: 1
Accepted Answers:
Dimensionality Reduction

1 point

Which method in sklearn is used for feature scaling to bring features between 0 and 1?

StandardScaler

MinMaxScaler

RobustScaler

MaxAbsScaler

Yes, the answer is correct.


Score: 1
Accepted Answers:
MinMaxScaler

View arrays
Yes, the answer is correct.
Score: 1
Accepted Answers:
Perform operations on arrays with different shapes

1 point
Which attribute gives the number of dimensions in a NumPy array?

ndim
shape
size
dtype
Yes, the answer is correct.
Score: 1
Accepted Answers:
ndim

1 point
Which NumPy function is used to create an array filled with zeros?

ones()
empty()
zeros()
zerosonly()
Yes, the answer is correct.
Score: 1
Accepted Answers:
zeros()

1 point
Which data type in NumPy represents a double precision float?

float16
float32
float64
complex64
Yes, the answer is correct.
Score: 1
Accepted Answers:
float64

1 point
In NumPy, which function is used to find the mean of array elements?

sum()
mean()
std()
median()
Yes, the answer is correct.
Score: 1
Accepted Answers:
mean()

1 point
What is returned by [Link] if the index is not specified?

Random index
Custom labels
Default numerical index
None
Yes, the answer is correct.
Score: 1
Accepted Answers:
Default numerical index

1 point
Which function reads a CSV file into a pandas DataFrame?

read_table()
read_csv()
csv_read()
read_json()
Yes, the answer is correct.
Score: 1
Accepted Answers:
read_csv()

1 point
Which method is used to print entire DataFrame as a string?

info()
head()
describe()
to_string()
Yes, the answer is correct.
Score: 1
Accepted Answers:
to_string()

1 point
Which method splits a DataFrame column into multiple columns?

split()
[Link]()
column_split()
split_column()
Yes, the answer is correct.
Score: 1
Accepted Answers:
[Link]()

1 point
Which method returns descriptive statistics of DataFrame?

summary()
info()
describe()
details()
Yes, the answer is correct.
Score: 1
Accepted Answers:
describe()

1 point
Which function in pandas is used to group data?

group()
groupdata()
groupby()
datagroup()
Yes, the answer is correct.
Score: 1
Accepted Answers:
groupby()

1 point
Which method returns first 5 rows of a DataFrame?

head()
top()
first()
summary()
Yes, the answer is correct.
Score: 1
Accepted Answers:
head()

Week 5 : Assignment 5

The due date for submitting this assignment has passed.

Due on 2025-08-27, 23:59 IST.

Assignment submitted on 2025-08-22, 14:44 IST


1 point

Which of the following is NOT a pillar of OOP?

Encapsulation

Inheritance

Compilation

Polymorphism

Yes, the answer is correct.


Score: 1
Accepted Answers:
Compilation
1 point

Which method is a constructor in Python classes?

__start__

__init__

__create__

__construct__

Yes, the answer is correct.


Score: 1
Accepted Answers:
__init__

1 point

Which keyword is used to inherit a class in Python?

implements

extends

superclass

(SuperclassName)

No, the answer is incorrect.


Score: 0
Accepted Answers:
(SuperclassName)

1 point

Which function is used to represent the object as a string?

__str__

__print__
__repr__

__show__

Yes, the answer is correct.


Score: 1
Accepted Answers:
__str__

1 point

Which of the following is an example of exception?

SyntaxError

BugError

TypeError

Extends

No, the answer is incorrect.


Score: 0
Accepted Answers:
SyntaxError

TypeError

1 point

Which block is executed whether an exception occurs or not?

try

except

finally

else

Yes, the answer is correct.


Score: 1
Accepted Answers:
finally

1 point

Which mode opens a file for writing only and overwrites existing content?

r+

Yes, the answer is correct.


Score: 1
Accepted Answers:
w

1 point

Which method is used to write multiple lines into a file?

write()

writelines()

lines()

readline()

Yes, the answer is correct.


Score: 1
Accepted Answers:
writelines()

1 point

Which attribute returns True if file is closed?

[Link]
[Link]

[Link]

[Link]

Yes, the answer is correct.


Score: 1
Accepted Answers:
[Link]

1 point

Which method reads a single line from a file?

read()

readline()

readlines()

writelines()

Yes, the answer is correct.


Score: 1
Accepted Answers:
readline()

1 point

Which function is used to change file pointer location?

read()

seek()

readline()

write()

Yes, the answer is correct.


Score: 1
Accepted Answers:
seek()

1 point

Which statement is TRUE about a module?

It contains only functions

It contains only classes

It can contain both functions and classes

It cannot be imported

Yes, the answer is correct.


Score: 1
Accepted Answers:
It can contain both functions and classes

1 point

What file must be created to make Python treat a directory as a package?

__main__.py

__init__.py

__start__.py

__package__.py

Yes, the answer is correct.


Score: 1
Accepted Answers:
__init__.py

1 point

Which of the following is a benefit of modules?

Slower execution
Easier maintenance

Limited reusability

Higher memory usage

Yes, the answer is correct.


Score: 1
Accepted Answers:
Easier maintenance

1 point

Which keyword is used to import a package or module?

using

import

include

module

Yes, the answer is correct.


Score: 1
Accepted Answers:
import

Week 4 : Assignment 4

The due date for submitting this assignment has passed.

Due on 2025-08-20, 23:59 IST.

Assignment submitted on 2025-08-18, 02:12 IST


1 point

Which data type in Python is mutable and stores data in key-value pairs?

List
Tuple

Set

Dictionary

Yes, the answer is correct.


Score: 1
Accepted Answers:
Dictionary

1 point

Which function is used to create an empty dictionary?

list()

dict()

set()

tuple()

Yes, the answer is correct.


Score: 1
Accepted Answers:
dict()

1 point

Which of the following methods returns all the keys of a dictionary?

items()

values()

keys()

get()

Yes, the answer is correct.


Score: 1
Accepted Answers:
keys()

1 point

Which method can update multiple entries in a dictionary at once?

add()

update()

insert()

extend()

Yes, the answer is correct.


Score: 1
Accepted Answers:
update()

1 point

Which of the following is TRUE about dictionary keys?

Keys can be mutable

Keys can be duplicated

Keys must be immutable

Keys must be integers

Yes, the answer is correct.


Score: 1
Accepted Answers:
Keys must be immutable

1 point

Which data type does NOT support duplicate elements?

List
Tuple

Set

String

Yes, the answer is correct.


Score: 1
Accepted Answers:
Set

1 point

Which function is used to create an empty set?

__set()

set()

set__()

set[]

Yes, the answer is correct.


Score: 1
Accepted Answers:
set()

1 point

Which operation is used for intersection of two sets in python?

&

Yes, the answer is correct.


Score: 1
Accepted Answers:
&

1 point

Which string method converts a string into lowercase?

upper()

swapcase()

casefold()

title()

Yes, the answer is correct.


Score: 1
Accepted Answers:
casefold()

1 point

Which function returns the number of elements in a set?

count()

len()

min()

max()

Yes, the answer is correct.


Score: 1
Accepted Answers:
len()

1 point

Which data type is ordered and immutable?

List
Set

Dictionary

Tuple

Yes, the answer is correct.


Score: 1
Accepted Answers:
Tuple

1 point

Which of the following is used to create a tuple?

{}

[]

()

<>

Yes, the answer is correct.


Score: 1
Accepted Answers:
()

1 point

Which string operation is used for concatenation?

Yes, the answer is correct.


Score: 1
Accepted Answers:
+

1 point

Which method of list adds an element at the end?

insert()

append()

extend()

add()

Yes, the answer is correct.


Score: 1
Accepted Answers:
append()

1 point

Which set operation results in elements only present in the first set and not in second?

Intersection

Union

Difference

Symmetric Difference

Yes, the answer is correct.


Score: 1
Accepted Answers:
Difference

Week 3 : Assignment 3

The due date for submitting this assignment has passed.


Due on 2025-08-13, 23:59 IST.

Assignment submitted on 2025-08-05, 19:37 IST


1 point

Which of the following are numeric data types in Python?

Integer, Float

Integer, Float, Boolean

Complex, String, List

Float, Set, Dictionary

Yes, the answer is correct.


Score: 1
Accepted Answers:
Integer, Float

1 point

Which function is used to read input from the user in Python?

read()

scanf()

input()

readline()

Yes, the answer is correct.


Score: 1
Accepted Answers:
input()

1 point

What will be the data type of value returned by the input() function?

Integer
String

Float

Boolean

Yes, the answer is correct.


Score: 1
Accepted Answers:
String

1 point

Which operator is used for string concatenation in Python?

&

Yes, the answer is correct.


Score: 1
Accepted Answers:
+

1 point

Which of the following is NOT the example of decision-making structures?

If

if-else

if-elif-else

for

Yes, the answer is correct.


Score: 1
Accepted Answers:
for

1 point

Which statement is used to skip the execution inside loops?

Continue

Break

Exit

return

Yes, the answer is correct.


Score: 1
Accepted Answers:
Continue

1 point

Which loop will always execute at least once?

for loop

while loop

do-while loop(conceptually)

nested loop

Yes, the answer is correct.


Score: 1
Accepted Answers:
do-while loop(conceptually)

1 point

What is the correct syntax of a for loop in python?

for (int i=0; i < n; i++)


for variable in sequence:

for variable range():

for sequence in variable:

Yes, the answer is correct.


Score: 1
Accepted Answers:
for variable in sequence:

1 point

In Python, which loop checks the condition before executing the block?

for loop

while loop

nested loop

infinite loop

Yes, the answer is correct.


Score: 1
Accepted Answers:
while loop

1 point

Which operator returns True if both operands are True?

or

and

not

xor

Yes, the answer is correct.


Score: 1
Accepted Answers:
and

1 point

Which are logical operators in Python?

and

or

not

in

Yes, the answer is correct.


Score: 1
Accepted Answers:
and

or

not

1 point

What does the "pass" statement do in Python?

Terminates a loop

Skips execution

Acts as a placeholder

Reverses condition

Yes, the answer is correct.


Score: 1
Accepted Answers:
Acts as a placeholder

1 point
Which symbol represents exponentiation in Python?

**

//

Yes, the answer is correct.


Score: 1
Accepted Answers:
**

1 point

What will be the result of 7 // 2 in Python?

3.5

Yes, the answer is correct.


Score: 1
Accepted Answers:
3

1 point

What does a function definition start with in Python?

function

func

def
define

Yes, the answer is correct.


Score: 1
Accepted Answers:
def

Week 2 : Assignment 2

The due date for submitting this assignment has passed.

Due on 2025-08-06, 23:59 IST.

Assignment submitted on 2025-07-31, 22:54 IST


1 point

What are the two main branches of Statistics?

Descriptive and Inferential Statistics

Qualitative and Quantitative Statistics

Population and Sampling Statistics

Hypothesis and Probability Statistics

Yes, the answer is correct.


Score: 1
Accepted Answers:
Descriptive and Inferential Statistics

1 point

Which of the following measures are considered measures of centrality? *(Select all that
apply)*

Mean

Variance
Median

Mode

Yes, the answer is correct.


Score: 1
Accepted Answers:
Mean

Median

Mode

1 point

In a box plot, what does the box represent?

Mean and Range

Interquartile Range (IQR)

Maximum and Minimum

Variance and Standard Deviation

Yes, the answer is correct.


Score: 1
Accepted Answers:
Interquartile Range (IQR)

1 point

Which sampling method involves dividing the population into groups and selecting entire
groups?

Simple Random Sampling

Stratified Sampling

Cluster Sampling

Systematic Sampling
Yes, the answer is correct.
Score: 1
Accepted Answers:
Cluster Sampling

1 point

Which of the following are types of hypothesis tests?

T-test

Z-test

Chi-square Test

ANOVA

Yes, the answer is correct.


Score: 1
Accepted Answers:
T-test

Z-test

Chi-square Test

ANOVA

1 point

The P-value indicates:

Sample size

Statistical significance

Confidence interval

Population parameter

Yes, the answer is correct.


Score: 1
Accepted Answers:
Statistical significance

1 point

Which test is used to compare means from two different samples?

One-sample t-test

Two-sample t-test

ANOVA

Chi-square Test

Yes, the answer is correct.


Score: 1
Accepted Answers:
Two-sample t-test

1 point

Conditional probability is denoted as:

P(A or B)

P(A and B)

P(A|B)

P(B)

Yes, the answer is correct.


Score: 1
Accepted Answers:
P(A|B)

1 point

Which rule is used to calculate the probability of two independent events happening
together?

Addition Rule
Multiplication Rule

Subtraction Rule

Division Rule

Yes, the answer is correct.


Score: 1
Accepted Answers:
Multiplication Rule

1 point

Which of the following are foundational rules of probability?

Probability of Impossible Event is 0

Probability of Certain Event is 1

Addition Rule

Multiplication Rule

Yes, the answer is correct.


Score: 1
Accepted Answers:
Probability of Impossible Event is 0

Probability of Certain Event is 1

Addition Rule

Multiplication Rule

1 point

In statistics, degrees of freedom (DF) is calculated as:

N-1

N+1
2N

N/2

Yes, the answer is correct.


Score: 1
Accepted Answers:
N-1

1 point

What type of data is "Red, Blue, Green" categorized as?

Quantitative Discrete

Quantitative Continuous

Qualitative Nominal

Qualitative Ordinal

Yes, the answer is correct.


Score: 1
Accepted Answers:
Qualitative Nominal

1 point

Which plot is mainly used to describe frequencies of categorical data?

Histogram

Frequency Plot

Scatter Plot

Box Plot

Yes, the answer is correct.


Score: 1
Accepted Answers:
Frequency Plot
1 point

In hypothesis testing, a two-tailed test is used when:

Testing for a specific direction

Testing for no specific direction

Testing variance only

Testing standard deviation only

Yes, the answer is correct.


Score: 1
Accepted Answers:
Testing for no specific direction

1 point

Which of the following are important components of a Box and Whisker plot?

Minimum

Maximum

Median

Quartiles

Yes, the answer is correct.


Score: 1
Accepted Answers:
Minimum

Maximum

Median

Quartiles

Week 1 : Assignment 1

The due date for submitting this assignment has passed.


Due on 2025-08-06, 23:59 IST.

Assignment submitted on 2025-07-23, 11:12 IST


1 point

What are the three core disciplines that Data Science combines?

Mathematics, Computer Engineering, and Artificial Intelligence

Programming, Database Management, and Neural Networks

Statistics, Computer Science, and Domain Expertise

Data Warehousing, Data Lakes, and Visualization

Yes, the answer is correct.


Score: 1
Accepted Answers:
Statistics, Computer Science, and Domain Expertise

1 point

Which of the following statements best describes unstructured data?

It is organized into rows and columns and stored in relational databases

It includes data like text, speech, and video that doesn’t fit into traditional tables

It is transactional data that reflects business activities

It only includes data collected via APIs and sensors

Yes, the answer is correct.


Score: 1
Accepted Answers:
It includes data like text, speech, and video that doesn’t fit into traditional tables

1 point

Which of the following Python libraries are commonly used in Data Science?

Pandas
NumPy

TensorFlow

Bootstrap

Yes, the answer is correct.


Score: 1
Accepted Answers:
Pandas

NumPy

TensorFlow

1 point

Which of the following statements correctly differentiate Data Science from Machine
Learning?

Data scientists primarily focus on model deployment and monitoring

Machine learning engineers are responsible for reporting findings

Data scientists typically focus on post-analysis interpretation, while machine learning


engineers focus on deployment and maintenance

Data scientists build autonomous systems that function without human intervention

Yes, the answer is correct.


Score: 1
Accepted Answers:
Data scientists typically focus on post-analysis interpretation, while machine learning
engineers focus on deployment and maintenance

1 point

Which stage is NOT part of the Data Science lifecycle?

Data collection

Knowledge Representation
Data preprocessing

Modeling and Evaluation

Yes, the answer is correct.


Score: 1
Accepted Answers:
Knowledge Representation

1 point

Which of the following tasks constitute the Artificial Intelligence?

Problem Solving

Data Preprocessing

Communication and Perception

Decision Making

Yes, the answer is correct.


Score: 1
Accepted Answers:
Problem Solving

Communication and Perception

Decision Making

1 point

Who developed the Python programming language?

Dennis Ritchie

Guido van Rossum

James Gosling

Tim Berners-Lee
Yes, the answer is correct.
Score: 1
Accepted Answers:
Guido van Rossum

1 point

Which of the following are features of Python?

Object-Oriented

Open Source

Platform Dependent

Portable

Yes, the answer is correct.


Score: 1
Accepted Answers:
Object-Oriented

Open Source

Portable

1 point

Which of the following is a web-based interactive development environment ideal for data
science?

IDLE

Colab

Notepad++

Sublime Text

Yes, the answer is correct.


Score: 1
Accepted Answers:
Colab

1 point

Google Colab is primarily based on which open-source project?

Jupyter

TensorFlow

Anaconda

PyTorch

Yes, the answer is correct.


Score: 1
Accepted Answers:
Jupyter

1 point

Which of the following are features of Google Colab?

Pre-installed data science libraries

Offline execution without internet

Integration with Kaggle datasets

Automatic storage and version control

Partially Correct.
Score: 0.66
Accepted Answers:
Pre-installed data science libraries

Integration with Kaggle datasets

Automatic storage and version control

1 point

Where are Colab notebook file stored by default?


Local system

AWS S3

Google Drive

Microsoft OneDrive

Yes, the answer is correct.


Score: 1
Accepted Answers:
Google Drive

1 point

In the Pima Indians Diabetes Dataset, what is the dependent variable that the model tries to
predict?

Pregnancies

Glucose concentration

Outcome (0 or 1)

BMI

Yes, the answer is correct.


Score: 1
Accepted Answers:
Outcome (0 or 1)

1 point

The objective of the California Housing Prices Dataset is to predict:

Ocean Proximity

Median Income

Total Rooms
Median House Value

No, the answer is incorrect.


Score: 0
Accepted Answers:
Median House Value

1 point

When accessing a GitHub project in Colab, what is the correct approach?

Download the repository and extract manually

Open the .ipynb file and click 'Open in Colab'

Use FTP client to import the repository

Convert GitHub files into .csv first

Yes, the answer is correct.


Score: 1
Accepted Answers:
Open the .ipynb file and click 'Open in Colab'

You might also like