Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

2nd Year August Quiz

Total questions: 40

Worksheet time: 30mins

Name
Class
Date
1.

Which of the following is a correct variable name in Python?

a)

1variable

b)

variable_1

c)

variable-1

d)

variable#1

2.

What is the correct way to create a list in Python?

a)

mylist = [1, 2, 3]

b)

mylist = (1, 2, 3)

c)

mylist = {1, 2, 3}

d)

mylist = <1, 2, 3>

3.

What will be the output of the following code?

a)

5

b)

10

c)

15

d)

Error

4.

What does the print() function do in Python?

a)

Prints data to the console

b)

Saves data to a file

c)

Converts data to a string

d)

Executes data

5.

What is the purpose of the pass statement in Python?

a)

To terminate a loop

b)

To skip a block of code

c)

To raise an exception

d)

To indicate no action is required

6.

What will be the output of the following code?

a)

[4, 1, 2, 3]

b)

[1, 2, 3, 4]

c)

None

d)

Error

7.

Which of the following methods is used to add an element at a specific index in a list?

a)

append()

b)

insert()

c)

extend()

d)

add()

8.

Which of the following is a way to handle exceptions in Python?

a)

try-except

b)

if-else

c)

for-while

d)

assert

9.

What will be the output of this code?

a)

8, 9

b)

9, 8

c)

6, 6

d)

4, 27

10.

Which of the following is true about Python classes?

a)

A class can inherit from multiple classes

b)

A class can only inherit from one class

c)

A class cannot inherit from another class

d)

None of the above

11.

Deep Learning is a subset of:

a)

Machine Learning

b)

Statistics

c)

Data Mining

d)

All of the above

12.

What is a neuron in a neural network?

a)

A mathematical function that processes inputs

b)

A type of memory storage

c)

A computer processor

d)

A form of data storage

13.

What is backpropagation in neural networks?

a)

A way to send data backward

b)

A method to update the model's weights by minimizing errors

c)

A process to collect data

d)

A way to add more layers to the network

14.

What does an activation function do?

a)

It turns the network on or off

b)

It decides the output of a neuron based on inputs

c)

It saves the model's weights

d)

It stores data in the network

15.

Generative Adversarial Networks (GANs) consist of:

a)

A generator and a discriminator

b)

Two generators

c)

) Two discriminators

d)

A generator and a classifier

16.

Hyperparameter tuning involves:

a)

Selecting the best values for model parameters

b)

Training the model

c)

Evaluating the model

d)

All of the above

17.

Natural Language Processing tasks like machine translation and text summarization are often addressed using:

a)

Convolutional Neural Networks

b)

Recurrent Neural Networks

c)

Transformer Networks

d)

Autoencoders

18.

What is the loss function used for in a neural network?

a)

To evaluate the difference between predicted and actual values

b)

To increase the model's speed by recovering loss packets

c)

To store data efficiently as to reduce loss

d)

To initialize the network

19.

What is the vanishing gradient problem in deep learning?

a)

When gradients are too small, slowing down learning

b)

When gradients are too large, and blur out the details

c)

When gradients don't change and becomes transparent

d)

When gradients are positive

20.

Which type of neural network is often used for image processing?

a)

Convolutional Neural Network (CNN)

b)

Recurrent Neural Network (RNN)

c)

Feedforward Neural Network (FNN)

d)

Hopfield Network

21.

Which algorithm is best suited for a linear relationship between input and output?

a)

Decision Tree

b)

Naive Bayes

c)

Linear Regression

d)

K-Means

22.

In Supervised Learning, what is a 'label'?

a)

Input feature

b)

Output prediction

c)

True output

d)

Loss function

23.

In logistic regression, what role does the sigmoid function play?

a)

It standardizes the input features

b)

It converts linear outputs into probabilities

c)

It calculates the loss function

d)

It minimizes the cost function

24.

Which is a measure of model complexity in supervised learning?

a)

Number of training samples

b)

Number of features

c)

Model depth

d)

Both B) and C)

25.

How does the Support Vector Machine (SVM) handle non-linearly separable data?

a)

By using a linear kernel

b)

By introducing soft margins

c)

By applying feature scaling

d)

By using bagging

26.

Which Python library is commonly used for implementing supervised learning algorithms?

a)

TensorFlow

b)

NumPy

c)

Scikit-learn

d)

Pandas

27.

Which function in Scikit-learn is used to split a dataset into training and testing sets?

a)

train_test_split()

b)

split_data()

c)

train_test()

d)

data_split()

28.

In a supervised learning problem, which function in Scikit-learn is used to preprocess the data by standardizing features?

a)

StandardScaler()

b)

MinMaxScaler()

c)

Normalizer()

d)

Binarizer()

29.

Which of the following is a classification problem?

a)

Predicting the price of a house

b)

Predicting whether an email is spam or not

c)

Predicting the temperature for the next week

d)

Predicting the sales revenue of a company

30.

Which metric is commonly used to evaluate the performance of a regression model?

a)

Accuracy

b)

Precision

c)

Mean Squared Error (MSE)

d)

F1-Score

31.

Which algorithm is often used for market basket analysis to find association rules?

a)

K-means

b)

DBSCAN

c)

Apriori algorithm

d)

PCA

32.

Which of the following is a key application of unsupervised learning?

a)

Predicting stock prices

b)

Classification of spam emails

c)

Clustering customer data

d)
  1. House price prediction

33.

In the Hidden Markov Model (HMM), what does the "hidden" part represent?

a)

The transition states

b)

The observed states

c)

The probabilities

d)

The latent (unobserved) states

34.

In unsupervised learning, what is a "cluster"?

a)

A single data point

b)

A group of similar data points

c)

A label assigned to data points

d)

A parameter used in the model

35.

Which of the following algorithms is commonly used for dimensionality reduction in unsupervised learning?

a)

K-Nearest Neighbours (KNN)

b)

Principal Component Analysis (PCA)

c)

Naive Bayes

d)

Support Vector Machines (SVM)

36.

What is the primary difference between K-means and Fuzzy C-means clustering?

a)

K-means uses hierarchical clustering

b)

Fuzzy C-means allows partial membership to multiple clusters

c)

K-means uses cosine distance, while Fuzzy C-means uses Euclidean distance

d)

Fuzzy C-means is deterministic

37.

In the Expectation-Maximization (EM) algorithm, how do you typically select the initial parameters?

a)

Random initialization

b)

Based on prior knowledge

c)

Using K-means clustering

d)

Using hierarchical clustering

38.

What is full form of PCA?

a)

Prompt Corrective Action

b)

Principal Component Analysis

c)

Principal Correct Attributes

d)

Precision Cure Action

39.

Which country recently announced plans to regulate the development and use of AI with a focus on transparency and ethical use?

a)

China

b)

United States

c)

Germany

d)

United Kingdom

40.

In 2024, which major tech company introduced a tool to help detect deepfakes in images and videos?

a)

Google

b)

Microsoft

c)

Meta

d)

Apple