Worksheets2nd Year August Quiz
Total questions: 40
Worksheet time: 30mins
Which of the following is a correct variable name in Python?
1variable
variable_1
variable-1
variable#1
What is the correct way to create a list in Python?
mylist = [1, 2, 3]
mylist = (1, 2, 3)
mylist = {1, 2, 3}
mylist = <1, 2, 3>
What will be the output of the following code?
5
10
15
Error
What does the print() function do in Python?
Prints data to the console
Saves data to a file
Converts data to a string
Executes data
What is the purpose of the pass statement in Python?
To terminate a loop
To skip a block of code
To raise an exception
To indicate no action is required
What will be the output of the following code?
[4, 1, 2, 3]
[1, 2, 3, 4]
None
Error
Which of the following methods is used to add an element at a specific index in a list?
append()
insert()
extend()
add()
Which of the following is a way to handle exceptions in Python?
try-except
if-else
for-while
assert
What will be the output of this code?
8, 9
9, 8
6, 6
4, 27
Which of the following is true about Python classes?
A class can inherit from multiple classes
A class can only inherit from one class
A class cannot inherit from another class
None of the above
Deep Learning is a subset of:
Machine Learning
Statistics
Data Mining
All of the above
What is a neuron in a neural network?
A mathematical function that processes inputs
A type of memory storage
A computer processor
A form of data storage
What is backpropagation in neural networks?
A way to send data backward
A method to update the model's weights by minimizing errors
A process to collect data
A way to add more layers to the network
What does an activation function do?
It turns the network on or off
It decides the output of a neuron based on inputs
It saves the model's weights
It stores data in the network
Generative Adversarial Networks (GANs) consist of:
A generator and a discriminator
Two generators
) Two discriminators
A generator and a classifier
Hyperparameter tuning involves:
Selecting the best values for model parameters
Training the model
Evaluating the model
All of the above
Natural Language Processing tasks like machine translation and text summarization are often addressed using:
Convolutional Neural Networks
Recurrent Neural Networks
Transformer Networks
Autoencoders
What is the loss function used for in a neural network?
To evaluate the difference between predicted and actual values
To increase the model's speed by recovering loss packets
To store data efficiently as to reduce loss
To initialize the network
What is the vanishing gradient problem in deep learning?
When gradients are too small, slowing down learning
When gradients are too large, and blur out the details
When gradients don't change and becomes transparent
When gradients are positive
Which type of neural network is often used for image processing?
Convolutional Neural Network (CNN)
Recurrent Neural Network (RNN)
Feedforward Neural Network (FNN)
Hopfield Network
Which algorithm is best suited for a linear relationship between input and output?
Decision Tree
Naive Bayes
Linear Regression
K-Means
In Supervised Learning, what is a 'label'?
Input feature
Output prediction
True output
Loss function
In logistic regression, what role does the sigmoid function play?
It standardizes the input features
It converts linear outputs into probabilities
It calculates the loss function
It minimizes the cost function
Which is a measure of model complexity in supervised learning?
Number of training samples
Number of features
Model depth
Both B) and C)
How does the Support Vector Machine (SVM) handle non-linearly separable data?
By using a linear kernel
By introducing soft margins
By applying feature scaling
By using bagging
Which Python library is commonly used for implementing supervised learning algorithms?
TensorFlow
NumPy
Scikit-learn
Pandas
Which function in Scikit-learn is used to split a dataset into training and testing sets?
train_test_split()
split_data()
train_test()
data_split()
In a supervised learning problem, which function in Scikit-learn is used to preprocess the data by standardizing features?
StandardScaler()
MinMaxScaler()
Normalizer()
Binarizer()
Which of the following is a classification problem?
Predicting the price of a house
Predicting whether an email is spam or not
Predicting the temperature for the next week
Predicting the sales revenue of a company
Which metric is commonly used to evaluate the performance of a regression model?
Accuracy
Precision
Mean Squared Error (MSE)
F1-Score
Which algorithm is often used for market basket analysis to find association rules?
K-means
DBSCAN
Apriori algorithm
PCA
Which of the following is a key application of unsupervised learning?
Predicting stock prices
Classification of spam emails
Clustering customer data
House price prediction
In the Hidden Markov Model (HMM), what does the "hidden" part represent?
The transition states
The observed states
The probabilities
The latent (unobserved) states
In unsupervised learning, what is a "cluster"?
A single data point
A group of similar data points
A label assigned to data points
A parameter used in the model
Which of the following algorithms is commonly used for dimensionality reduction in unsupervised learning?
K-Nearest Neighbours (KNN)
Principal Component Analysis (PCA)
Naive Bayes
Support Vector Machines (SVM)
What is the primary difference between K-means and Fuzzy C-means clustering?
K-means uses hierarchical clustering
Fuzzy C-means allows partial membership to multiple clusters
K-means uses cosine distance, while Fuzzy C-means uses Euclidean distance
Fuzzy C-means is deterministic
In the Expectation-Maximization (EM) algorithm, how do you typically select the initial parameters?
Random initialization
Based on prior knowledge
Using K-means clustering
Using hierarchical clustering
What is full form of PCA?
Prompt Corrective Action
Principal Component Analysis
Principal Correct Attributes
Precision Cure Action
Which country recently announced plans to regulate the development and use of AI with a focus on transparency and ethical use?
China
United States
Germany
United Kingdom
In 2024, which major tech company introduced a tool to help detect deepfakes in images and videos?
Microsoft
Meta
Apple
