SEC III Artificial Intelligence Question Bank
SEC III Artificial Intelligence Question Bank
A) Machine Learning
B) Neural Networks
C) Blockchain
Answer: C) Blockchain
5. What type of machine learning is used when the model learns from data that is
neither classified nor labeled?
A) Supervised Learning
B) Unsupervised Learning
C) Reinforcement Learning
D) Semi-supervised Learning
A) Predictive maintenance
C) Fraud detection
A) Agriculture
B) Retail
C) Manufacturing
D) Transportation
Answer: B) Retail
A) Automated trading
B) Weather prediction
D) Autonomous vehicles
A) Spam filtering
C) Sentiment analysis
D) Speech recognition
Unit 1: Lecture 2
1. What is the main assumption of the Naive Bayes classifier?
A) Continuous data
B) Text data
C) Image data
D) Time-series data
B) It is computationally intensive
Answer: C) It assumes independence among predictors, which is rarely true in real life
A) To maximize the distance between the decision boundary and the nearest data points of any
class
Answer: A) To maximize the distance between the decision boundary and the nearest data points
of any class
A) Linear Kernel
B) Polynomial Kernel
C) To perform clustering
D) To reduce dimensionality
Answer: B) To split data into subsets based on the value of input attributes
A) Gini Index
B) Information Gain
C) Gain Ratio
D) Chi-Square
Unit 1: Lecture 3
1. What is a Random Forest?
C) A clustering algorithm
D) A linear model
A) It is easy to implement
B) Image recognition
C) Natural language processing
D) Clustering
D) Reduce dimensionality
A) Entropy
C) Gini Index
D) Euclidean Distance
A) Linearity of relationships
B) Independence of errors
C) Homoscedasticity
A) Continuous values
B) Categorical values
C) Cluster labels
D) Time-series data
A) Linear function
B) Polynomial function
C) Sigmoid function
D) Logarithmic function
Unit 1: Lecture 4
1. What is the primary goal of clustering in machine learning?
B) Density-based clustering
C) Agglomerative clustering
A) The data point that is farthest from the center of the cluster
A) To minimize the sum of squared distances between points and their respective cluster
centroids
Answer: A) To minimize the sum of squared distances between points and their respective
cluster centroids
A) It is easy to implement
A) Image compression
C) Spam filtering
D) Sentiment analysis
Answer: B) The results can be highly sensitive to the choice of distance metric
Unit 1: Lecture 5
1. Which of the following is a type of hierarchical clustering?
A) K-Means
B) DBSCAN
C) Agglomerative clustering
D) Mean Shift
2. Which clustering method is best suited for discovering clusters of arbitrary shape?
A) K-Means
B) DBSCAN
C) Agglomerative clustering
D) K-Medoids
Answer: B) DBSCAN
A) Image recognition
B) Fraud detection
D) Sentiment analysis
Answer: C) It requires specifying density parameters like epsilon and minimum points
B) Customer segmentation
C) Sentiment analysis
D) Real-time prediction
Unit 1: Lecture 6
1. Which library in Python is commonly used for implementing K-Nearest Neighbors
(KNN)?
A) NumPy
B) SciPy
C) scikit-learn
D) TensorFlow
Answer: C) scikit-learn
2. In KNN, what happens when you increase the value of K?
A) KNeighborsClassifier()
B) KNeighborsRegressor()
C) KNN()
D) NearestNeighbors()
Answer: A) KNeighborsClassifier()
4. What parameter in KNN determines the distance metric used to find the nearest
neighbors?
A) n_neighbors
B) metric
C) weights
D) algorithm
Answer: B) metric
A) It is simple to implement
D) It is non-parametric
Answer: B) It requires large amounts of memory for storing the entire dataset
A) pandas
B) matplotlib
C) scikit-learn
D) seaborn
Answer: C) scikit-learn
A) fit()
B) train()
C) predict()
D) apply()
Answer: A) fit()
A) model.fit()
B) model.predict()
C) model.train()
D) model.transform()
Answer: B) model.predict()
A) Classifying images
C) Clustering customers
D) Detecting anomalies
A) // This is a comment
B) # This is a comment
C) /* This is a comment */
Unit 1: Lecture 7
1. Which Python library is commonly used for implementing K-Means clustering?
A) pandas
B) scikit-learn
C) NumPy
D) TensorFlow
Answer: B) scikit-learn
A) KMeansCluster()
B) KMeans()
C) KMeansClustering()
D) ClusterKMeans()
Answer: B) KMeans()
A) n_clusters
B) n_groups
C) clusters
D) groups
Answer: A) n_clusters
A) fit()
B) train()
C) predict()
D) apply()
Answer: A) fit()
A) Continuous values
B) Categorical values
C) Cluster labels
D) Time-series data
A) train()
B) fit()
C) predict()
D) apply()
Answer: B) fit()
7. Which Python library is commonly used for implementing Support Vector Machines
(SVM)?
A) pandas
B) scikit-learn
C) NumPy
D) TensorFlow
Answer: B) scikit-learn
o A) Linear
o B) Polynomial
o C) Radial Basis Function (RBF)
o D) All of the above
9. Which function in scikit-learn is used to split data into training and testing sets?
A) train_test_split()
B) split_data()
C) data_split()
D) train_test()
Answer: A) train_test_split()
B) R-squared
C) Accuracy
Answer: C) Accuracy
Lecture 1 : Unit 2
a) int
b) float
c) complex
d) real
Answer: d) real
10 // 3
a) 3.3333
b) 3
c) 3.0
d) 4
Answer: b) 3
x = 5
y = 10
x += y
print(x)
a) 5
b) 10
c) 15
d) 50
Answer: c) 15
Q.4 Which of the following operators is used for string concatenation in Python?
a) *
b) &
c) +
d) #
Answer: c) +
Q.5 What will be the output of the following code?
x = "Hello"
y = 'World'
print(x + y)
a) Hello World
b) HelloWorld
c) Hello+World
d) Error
Answer: b) HelloWorld
5 % 2
a) 2
b) 1
c) 0
d) 5
Answer: b) 1
print(2 ** 3)
a) 5
b) 6
c) 8
d) 9
Answer: c) 8
Q.8 Which of the following is the correct way to declare a variable and assign the value 10 to it in
Python?
a) int x = 10
b) x = 10
c) x := 10
d) int x := 10
Answer: b) x=10
Q.9 Which of the following methods can be used to convert a string to an integer in Python?
a) int()
b) str()
c) float()
d) ord()
Answer: b) str()
4 + 3 * 2
a) 14
b) 10
c) 8
d) 7
Answer: b) 10
Lecture 2 : Unit 2
Q.1 What does the // operator do in Python?
A) Division
B) Multiplication
C) Floor Division
D) Modulus
A) +
B) -
C) %
D) *
Answer: C) %
x=5
if x > 3:
print("Hello")
else:
print("Goodbye")
A) Hello
B) Goodbye
C) Error
D) Nothing
Answer: A) Hello
B) To end an if statement
D) To define a function
A) if x = 5:
B) if (x == 5)
C) if x == 5:
D) if (x = 5):
Answer: C) if x == 5:
Q.6 Which of the following can be used to check multiple conditions in an if statement?
A) if-else
B) if-elif-else
C) switch-case
D) while-loop
Answer: B) if-elif-else
A) x =! y
B) x == y
C) x != y
D) x < y
Answer: C) x != y
Q.8 What will be the output of the following code?
x=0
if x:
print("True")
else:
print("False")
A) True
B) False
C) Error
D) Nothing
Answer: B) False
C) Using if statement
A) if x = 5
B) if x: 5
C) if x == 5
D) if x equals 5
Answer: C) if x == 5
Lecture 3 : Unit 2
Q.1 Which of the following is true about nested if-else statements?
x = 15
if x > 10:
if x > 20:
else:
if x == 15:
print("x is 15")
a) x is greater than 20
b) x is 15
c) No output
d) Syntax error
Answer: b) x is 15
Q.3 Which of the following is the correct syntax for nested if-else in Python?
x = -10
if x > 0:
if x % 2 == 0:
print("Positive even")
else:
print("Positive odd")
else:
if x % 2 == 0:
print("Negative even")
else:
print("Negative odd")
a) Positive even
b) Positive odd
c) Negative even
d) Negative odd
a) break
b) continue
c) exit
d) terminate
Answer: a) break
x=5
while x > 0:
x -= 1
if x == 2:
break
a) 4 3 2 1 0
b) 4 3 2
c) 4 3
d) 5 4 3
Answer: c) 4 3
Q.8 What will happen if the condition in a while loop never becomes False?
a) while x = 5:
b) while x == 5
c) while (x == 5):
d) while x == 5:
Answer: d) while x == 5:
A. for i in s:
B. for i in range(s):
C. foreach i in s:
D. for each i in s:
Answer: A
Q,2 What is the correct syntax to use a for loop to print each item in the list fruits?
Answer: A
A. sequence()
B. range()
C. list()
D. set()
Answer: B
Q.4 What is the correct syntax for a for loop in Python to iterate over a list named
numbers?
A. for i in range(numbers):
B. for i in numbers:
C. foreach i in numbers:
Answer: B
print(i)
A. 5 6 7 8
B. 5 6 7
C. 6 7 8
D. 5 6
Answer: B
print(i)
A. 2 3 4 5 6 7 8 9
B. 2 4 6 8
C. 2 4 6 8 10
D. 2 4 6
Answer: B
if i == 3:
break
print(i)
A. 1 2 3
B. 1 2
C. 1 2 3 4
D. 1 2 4
Answer: B
Q. 8 What is the output of the following code?
for i in range(3):
for j in range(2):
print(i, j)
Answer: B
Q.9 How can you iterate through a set s using a for loop?
A. for i in s:
B. for i in range(s):
C. foreach i in s:
D. for each i in s:
Answer: A
for i in range(2):
for j in range(3):
print(i + j)
A. 0 1 2 1 2 3
B. 0 1 2 1 2 3 4
C. 0 1 2 1 2 3
D. 0 1 2 0 1 2
Answer: D
Unit 2: Lecture 5
Q.1 What is the correct syntax to define a function in Python?
A. function myFunction():
B. def myFunction():
C. define myFunction():
D. function: myFunction()
Answer: B
Q.2 Which of the following is the correct way to call a function named calculate with no
arguments?
A. calculate;
B. calculate[];
C. calculate();
D. call calculate();
Answer: C
Q.3 What is the default return value of a function in Python if no return statement is used?
A. 0
B. None
C. False
D. ''
Answer: B
Answer: C
Q.5 What is the correct way to define a function that takes no parameters and returns no
value?
D. def func() {}
Answer: A
A. 15
B. 5
C. 10
D. x + y
Answer: A
Q.7 Which of the following is true about function parameters in Python?
Answer: C
Q.8 Which of the following is true about the return statement in Python?
C. It is optional
D. Both A and C
Answer: D
A. False
B. True
C. None
D. Error
Answer: A
Answer: C
Unit 2: Lecture 6
Q. 1 Which of the following is the correct syntax to create an empty list in Python?
A) my_list = {}
B) my_list = []
C) my_list = ()
D) my_list = None
Answer: B) my_list = []
A) append()
B) add()
C) insert()
D) extend()
Answer: A) append()
Q.3 Which method would you use to remove an element at a specific index in a list?
A) remove()
B) delete()
C) pop()
D) discard()
**Answer: C) pop()
Q. 4 Which of the following list methods returns the index of the first occurrence of a
value?
A) find()
B) search()
C) index()
D) locate()
**Answer: C) index()
A) 0
B) 1
C) 2
D) 3
**Answer: C) 2
Q. 6 Which of the following is the correct syntax to create an empty tuple in Python?
A) my_tuple = {}
B) my_tuple = []
C) my_tuple = ()
D) my_tuple = None
Answer: C) my_tuple = ()
Q. 7 How can you access the first element of a tuple named my_tuple?
A) my_tuple[first]
B) my_tuple[0]
C) my_tuple[1]
D) my_tuple[-1]
**Answer: B) my_tuple[0]
A) append()
B) insert()
C) remove()
D) count()
**Answer: D) count()
Q. 9 What will be the result of the following code: my_tuple = (1, 2, 3); my_tuple[1] =
10?
A) (1, 10, 3)
B) [1, 10, 3]
C) TypeError
D) IndexError
**Answer: C) TypeError
Unit-3 Lecture -1
A. Data analysis
B. Data collection
C. Data visualization
D. Data cleaning
A. Height in centimeters
B. Temperature in Fahrenheit
C. Eye color
D. Age in years
A. Nominal data
B. Ordinal data
C. Interval data
D. Ratio data
4. Which type of data includes values that are ordered but not equally spaced?
A. Nominal
B. Ordinal
C. Interval
D. Ratio
ANS: B. Ordinal
A. Medical diagnosis
C. Speech recognition
A. Clustering
B. Classification
C. Regression
D. Dimensionality reduction
ANS: C. Regression
Unit -3
Lecture- 2
A. Data visualization
B. Web development
C. Machine learning
D. Text processing
2. Which function is used to split a dataset into training and testing sets in Scikit-
Learn?
A. split_train_test()
B. train_test_split()
C. split_dataset()
D. dataset_split()
ANS: B. train_test_split()
A. Machine learning
B. Statistical computations
C. Data visualization
D. Web scraping
A. Data preprocessing
B. Data analysis
C. Data visualization
D. Data cleaning
• B. It has 10 features.
• C. It includes species of flowers as the target variable.
• D. It is used for image recognition.
• A. Blood pressure
• B. Body mass index (BMI)
• C. Disease progression after one year
• D. Age
A. Two arrays: one for training data and one for testing data
B. Three arrays: one for training data, one for testing data, and one for validation data
C. Four arrays: training data, test data, training labels, and test labels
ANS: C. Four arrays: training data, test data, training labels, and test labels
9. Which parameter in train_test_split() controls the proportion of the dataset to
include in the test split?
A. test_size
B. train_size
C. random_state
D. shuffle
ANS: A. test_size
Unit-3_Lecture3
1. Which Python library is used to load the data frame in a 2D array format and
has multiple functions to perform analysis tasks?
1. Numpy
2. Pandas
3. Matplotlib
4. Seaborn
Answer: 2. Pandas
1. Data loading
2. Numerical computations
3. Data visualization
4. Data cleaning
4. How can you remove rows with NULL values from a DataFrame?
1. str.upper()
2. str.lower()
3. str.title()
4. str.strip()
Answer: 2. str.lower()
6. Which of the following is NOT a type of bad data that needs cleaning?
1. Empty cells
2. Data in correct format
3. Wrong data
4. Duplicates
7. Which pandas method can be used to remove rows or columns with missing
values?
1. dropna()
2. fillna()
3. replace()
4. interpolate()
Answer: 1. dropna()
9. Which library in Python is primarily used for data manipulation and analysis,
especially for handling tabular data?
1. Scikit-learn
2. Matplotlib
3. Pandas
4. Numpy
Answer: 3. Pandas
Unit – 3
Lecture -4
1. Which method is used to replace missing values in a DataFrame with the mean
value of a column?
1. replace()
2. dropna()
3. fillna()
4. interpolate()
Answer: 3. fillna()
2. What value is used to replace missing values when using the mode method in
data preprocessing?
3. What value is used to replace missing values when using the median method in
data preprocessing?
Answer: 2. The value in the middle after sorting all values ascending
4. Which pandas method is used to convert a column of dates into a standard date
format?
1. to_date()
2. to_datetime()
3. strftime()
4. strptime()
Answer: 2. to_datetime()
5. How can you remove rows with NULL values after converting a column to a
standard date format?
1. df.dropna(subset=['Date'], inplace=True)
2. df.replace(to_datetime(), inplace=True)
3. df.fillna(subset=['Date'], inplace=True)
4. df.drop(columns=['Date'], inplace=True)
6. Which of the following is a common method for handling cells with wrong data
formats?
1. dropna()
2. drop_duplicates()
3. fillna()
4. replace()
Answer: 2. drop_duplicates()
8. Which encoding method is used to convert categorical labels into numeric form?
1. One-Hot Encoding
2. Label Encoding
3. Standard Scaling
4. Min-Max Scaling
9. Which method is used to replace missing values with the most frequently
occurring value in a column?
1. fillna(mode())
2. replace(mode())
3. fillna(x.mode())
4. fillna(x.mode()[0])
Answer: 4. fillna(x.mode()[0])
Unit - 3
Lecture -5
1. Which library in Python is commonly used for data manipulation and analysis?
A) NumPy
B) Pandas
C) Matplotlib
D) Scikit-learn
Answer: B) Pandas
2. Which Python library is primarily used for scientific computing and handling large multi-
dimensional arrays and matrices?
A) Pandas
B) SciPy
C) NumPy
D) TensorFlow
Answer: C) NumPy
3. Which Python library would you use for creating static, interactive, and animated visualizations?
A) Seaborn
B) Matplotlib
C) Plotly
D) Bokeh
Answer: B) Matplotlib
4. Which library is used for machine learning and provides simple and efficient tools for data
mining and data analysis?
A) TensorFlow
B) Keras
C) Scikit-learn
D) Theano
Answer: C) Scikit-learn
5. Which library provides high-level neural networks API, written in Python and capable of
running on top of TensorFlow, CNTK, or Theano?
A) Keras
B) PyTorch
C) Caffe
D) MXNet
Answer: A) Keras
6. Which Python library is designed for data visualization and is based on Matplotlib but provides
a higher-level interface for drawing attractive and informative statistical graphics?
A) Matplotlib
B) Seaborn
C) Plotly
D) Bokeh
Answer: B) Seaborn
7. Which library is used for numerical optimization, integration, interpolation, eigenvalue
problems, and other advanced mathematical operations?
A) NumPy
B) SciPy
C) Matplotlib
D) Pandas
Answer: B) SciPy
8. Which library provides an easy interface for creating static, interactive, and animated
visualizations in Python?
A) Matplotlib
B) Plotly
C) Seaborn
D) Pandas
Answer: B) Plotly
A) TensorFlow
B) Matplotlib
C) NumPy
D) Flask
Answer: A) TensorFlow
10. Which library would you use to work with data visualization specifically designed for
statistical graphics in Python?
A) Matplotlib
B) Seaborn
C) Pandas
D) SciPy
Answer: B) Seaborn
Unit – 3
Lecture – 6
1. Which function in the Pandas library is used to display the first few rows of a DataFrame?
A) .head()
B) .tail()
C) .info()
D) .describe()
Answer: A) .head()
A) .head()
B) .describe()
C) .info()
D) .value_counts()
Answer: B) .describe()
3. Which method would you use to check for missing values in a DataFrame?
A) .isnull()
B) .dropna()
C) .fillna()
D) .notnull()
Answer: A) .isnull()
A) plt.bar()
B) plt.plot()
C) plt.hist()
D) plt.scatter()
Answer: B) plt.plot()
Answer: B) sns.heatmap()
A) .value_counts()
B) .unique()
C) .nunique()
D) .drop_duplicates()
Answer: B) .unique()
7. Which Pandas method provides a quick overview of the DataFrame, including the number of
non-null entries and the data type of each column?
A) .head()
B) .tail()
C) .info()
D) .describe()
Answer: C) .info()
A) plt.plot()
B) plt.hist()
C) plt.bar()
D) plt.scatter()
Answer: C) plt.bar()
A) pd.read_csv()
B) pd.read_excel()
C) pd.read_json()
D) pd.read_table()
Answer: A) pd.read_csv()
Answer: B) plt.hist()
Unit 3 : Lecture – 7
Question 1: Which library is primarily used for data manipulation and analysis
in Python?
A) NumPy
B) SciPy
C) Matplotlib
D) Pandas
Answer: D) Pandas
A) Pandas
B) NumPy
C) Seaborn
D) TensorFlow
Answer: B) NumPy
A) NumPy
B) SciPy
C) Matplotlib
D) Pandas
Answer: B) SciPy
Question 4: Which library is widely used for data visualization in Python,
offering a wide range of static, animated, and interactive plots?
A) Seaborn
B) Bokeh
C) Matplotlib
D) Plotly
Answer: C) Matplotlib
A) plt.bar()
B) plt.scatter()
C) plt.plot()
D) plt.line()
Answer: C) plt.plot()
Question 6: Which of the following libraries can be used to create scatter plots in
Python?
A) Matplotlib
B) Seaborn
C) Plotly
D) All of the above
A) plt.plot()
B) plt.bar()
C) plt.hist()
D) plt.scatter()
Answer: B) plt.bar()
Question 8: Which parameter in plt.plot() can be used to specify the color of the
line?
A) linestyle
B) linewidth
C) color
D) marker
Answer: C) color
Question 9: Which Python library is used for working with large multi-
dimensional arrays and matrices, and includes a large collection of mathematical
functions?
A) Pandas
B) NumPy
C) SciPy
D) TensorFlow
Answer: B) NumPy
Question 10: Which library is used for interactive visualizations and dashboards
in Python?
A) Matplotlib
B) Seaborn
C) Plotly
D) ggplot
Answer: C) Plotly
Unit 4 : Lectur 1
Q.1 What is the correct syntax to define a function in Python?
A. function myFunction():
B. def myFunction():
C. define myFunction():
D. function: myFunction()
Answer: B
Q.2 Which of the following is the correct way to call a function named calculate with no
arguments?
A. calculate;
B. calculate[];
C. calculate();
D. call calculate();
Answer: C
Q.3 What is the default return value of a function in Python if no return statement is used?
A. 0
B. None
C. False
D. ''
Answer: B
Answer: C
Q.5 What is the correct way to define a function that takes no parameters and returns no
value?
D. def func() {}
Answer: A
A. 15
B. 5
C. 10
D. x + y
Answer: A
Answer: C
Q.8 Which of the following is true about the return statement in Python?
C. It is optional
D. Both A and C
Answer: D
A. False
B. True
C. None
D. Error
Answer: A
Answer: C
Unit 4 : Lecture 2
1. Which method is used to replace missing values in a Data Frame with the mean
value of a column?
5. replace()
6. dropna()
7. fillna()
8. interpolate()
Answer: 3. fillna()
2. What value is used to replace missing values when using the mode method in
data preprocessing?
3. What value is used to replace missing values when using the median method in
data preprocessing?
Answer: 2. The value in the middle after sorting all values ascending
4. Which pandas method is used to convert a column of dates into a standard date
format?
5. to_date()
6. to_datetime()
7. strftime()
8. strptime()
Answer: 2. to_datetime()
5. How can you remove rows with NULL values after converting a column to a
standard date format?
5. df.dropna(subset=['Date'], inplace=True)
6. df.replace(to_datetime(), inplace=True)
7. df.fillna(subset=['Date'], inplace=True)
8. df.drop(columns=['Date'], inplace=True)
6. Which of the following is a common method for handling cells with wrong data
formats?
5. dropna()
6. drop_duplicates()
7. fillna()
8. replace()
Answer: 2. drop_duplicates()
8. Which encoding method is used to convert categorical labels into numeric form?
5. One-Hot Encoding
6. Label Encoding
7. Standard Scaling
8. Min-Max Scaling
9. Which method is used to replace missing values with the most frequently
occurring value in a column?
5. fillna(mode())
6. replace(mode())
7. fillna(x.mode())
8. fillna(x.mode()[0])
Answer: 4. fillna(x.mode()[0])
Unit 4 : Lecture 3
• A) Accuracy
• B) Precision
• C) Recall
• D) Mean Squared Error
Correct Answer: D
Correct Answer: A
Correct Answer: C
4.Which metric is the most appropriate for imbalanced classification
problems?
• A) Accuracy
• B) Precision
• C) Recall
• D) F1-Score
Correct Answer: D
• A) Accuracy of a model
• B) Precision and recall values
• C) True Positives, False Positives, True Negatives, False Negatives
• D) The likelihood of an error in the model
Correct Answer: C
6.Which metric considers both false positives and false negatives equally?
• A) Precision
• B) Accuracy
• C) Recall
• D) F1-Score
Correct Answer: B
7.In a classification problem, if the model always predicts the majority class,
which metric will likely be high?
• A) Precision
• B) Recall
• C) Accuracy
• D) F1-Score
Correct Answer: C
Correct Answer: B
9.Which metric is least useful when dealing with highly imbalanced classes?
• A) Accuracy
• B) F1-Score
• C) Precision
• D) Recall
Correct Answer: A
10.In the context of a confusion matrix, what does the term 'False Positive' refer
to?
Correct Answer: B
Unit 4 : Lecture 4
B) Adjusted R-squared
C) MAE
D) MSE
Answer: B
2.Which metric is typically used in conjunction with R-squared to assess the quality of a
regression model?
A) RMSE
C) Adjusted R-squared
Answer: C
3.What does it mean if the R-squared value is high, but the RMSE is also high?
Answer: D
A) A better model
B) A worse model
C) Overfitting
D) High variance
Answer: A
5.If the residuals in a regression model are normally distributed, which metric is more
reliable?
D) Adjusted R-squared
Answer: A
Answer: A
7.Which of the following metrics would be most appropriate for comparing two regression
models with different numbers of predictors?
A) R-squared
B) Adjusted R-squared
C) MSE
D) RMSE
Answer: B
C) R-squared
Answer: B
B) R-squared
D) Adjusted R-squared
Answer: C
10.Which of the following regression metrics measures the average squared difference
between actual and predicted values?
A) R-squared
B) Mean Absolute Error (MAE)
Answer: C
Unit 4 : Lecture 5
a) NumPy
b) Pandas
c) Scikit-learn
d) TensorFlow
Ans- c) Scikit-learn
3.Which of the following combinations can be used to split data using train_test_split?
Correct answer: C
Correct answer: B
B) 5 times
C) 10 times
D) 1 time
Correct answer: B
A) Data augmentation
B) Model evaluation
C) Feature selection
D) Data preprocessing
8.How many iterations are performed in LOOCV for a dataset with n samples?
A) 1
B) n-1
C) n
D) n/2
Correct Answer: C) n
B) To optimize hyperparameters
Answer: C
10.In holdout validation, how many times is the model trained and tested?
A) Once
B) Twice
C) Ten times
D) As many as needed
Answer: A
Unit – 5
Assignment – 1
A) Java
B) Python
C) Ruby
D) C++
Answer: B) Python
Question 3: Which of the following is true about Google Colab's GPU and TPU
support?
A) .txt
B) .docx
C) .ipynb
D) .xlsx
Answer: C) .ipynb
A) Integrated debugger
B) Variable Explorer
C) Built-in Git support
Question 6: Which Python library is required to enable the variable explorer and
data visualization in Spyder?
A) NumPy
B) SciPy
C) Pandas
D) Matplotlib
Answer: C) Pandas
A) Creating websites
C) Video editing
D) Word processing
Question 9: What is the main interface of Orange called, where users can create
data workflows?
A) Dashboard
B) Canvas
C) Editor
D) Terminal
Answer: B) Canvas
A) Heatmap
B) Scatter Plot
C) Box Plot
D) Data Table
Unit – 5
Assignment – 2
Question 1: What is the first step in starting an AI project?
A) Collecting data
B) Defining the problem
C) Selecting algorithms
D) Training the model
A) Data
B) Colors
C) Fonts
D) Animations
Answer: A) Data
A) To generate data
B) To find patterns in data
C) To visualize data
D) To clean data
A) To fill storage
B) To train the model
C) To create charts
D) To decorate reports
Question 10: After training an AI model, what is an important next step before
deployment?
A) Ignoring results
B) Writing reports
C) Model evaluation
D) Data collection
Unit 5 : Lecture 3
D) Managing databases
A) Java
B) Python
C) Ruby
D) C++
Answer: B) Python
Question 3: Which of the following is true about Google Colab's GPU and TPU
support?
A) .txt
B) .docx
C) .ipynb
D) .xlsx
Answer: C) .ipynb
A) Integrated debugger
B) Variable Explorer
Question 6: Which Python library is required to enable the variable explorer and
data visualization in Spyder?
A) NumPy
B) SciPy
C) Pandas
D) Matplotlib
Answer: C) Pandas
A) Creating websites
C) Video editing
D) Word processing
Question 9: What is the main interface of Orange called, where users can create
data workflows?
A) Dashboard
B) Canvas
C) Editor
D) Terminal
Answer: B) Canvas
A) Heatmap
B) Scatter Plot
C) Box Plot
D) Data Table
A) Collecting data
B) Defining the problem
C) Selecting algorithms
D) Training the model
A) Data
B) Colors
C) Fonts
D) Animations
Answer: A) Data
A) To generate data
B) To find patterns in data
C) To visualize data
D) To clean data
A) To fill storage
B) To train the model
C) To create charts
D) To decorate reports
Answer: B) To train the model
Question 10: After training an AI model, what is an important next step before
deployment?
A) Ignoring results
B) Writing reports
C) Model evaluation
D) Data collection
Unit 5 : Lecture 5
Q.1 How can you iterate through a set s using a for loop?
A. for i in s:
B. for i in range(s):
C. foreach i in s:
D. for each i in s:
Answer: A
Q,2 What is the correct syntax to use a for loop to print each item in the list fruits?
Answer: A
A. sequence()
B. range()
C. list()
D. set()
Answer: B
Q.4 What is the correct syntax for a for loop in Python to iterate over a list named
numbers?
A. for i in range(numbers):
B. for i in numbers:
C. foreach i in numbers:
Answer: B
print(i)
A. 5 6 7 8
B. 5 6 7
C. 6 7 8
D. 5 6
Answer: B
print(i)
A. 2 3 4 5 6 7 8 9
B. 2 4 6 8
C. 2 4 6 8 10
D. 2 4 6
Answer: B
Q. 7 What is the output of the following code?
if i == 3:
break
print(i)
A. 1 2 3
B. 1 2
C. 1 2 3 4
D. 1 2 4
Answer: B
for i in range(3):
for j in range(2):
print(i, j)
Answer: B
Q.9 How can you iterate through a set s using a for loop?
A. for i in s:
B. for i in range(s):
C. foreach i in s:
D. for each i in s:
Answer: A
Q. 10 What is the output of the following code?
for i in range(2):
for j in range(3):
print(i + j)
A. 0 1 2 1 2 3
B. 0 1 2 1 2 3 4
C. 0 1 2 1 2 3
D. 0 1 2 0 1 2
Answer: D