WGU D446: DATA SCIENCE TOOLS AND
TECHNIQUES - COMPREHENSIVE
PRACTICE EXAM QUESTIONS AND
ANSWERS
1. In the context of the Pandas library in Python, what is the primary difference between the
.loc and .iloc indexers?
A. .loc includes the start but excludes the end index, while .iloc includes both.
B. .loc is used for series only, while .iloc is used for dataframes.
C. .loc uses label-based indexing, while .iloc uses integer-based positional indexing.
D. There is no functional difference; they are aliases for the same indexing method.
Answer: C
Conceptual Explanation: .loc is label-based, meaning you specify the row or column
names. .iloc is integer-based, meaning you specify the numerical position.
2. When using SQL for data extraction, which clause is specifically used to filter the results of
an aggregate function?
A. WHERE
B. HAVING
,C. ORDER BY
D. GROUP BY
Answer: B
Conceptual Explanation: The HAVING clause was added to SQL because the WHERE
keyword could not be used with aggregate functions.
3. In R’s Tidyverse ecosystem, which function is primarily used to change the shape of data
from ‘wide’ to ‘long’?
A. pivot_longer()
B. mutate()
C. select()
D. filter()
Answer: A
Conceptual Explanation: pivot_longer() ‘lengthens’ data, increasing the number of rows
and decreasing the number of columns, which is a common requirement for tidy data.
4. What is the primary purpose of a ‘Data Lake’ compared to a ‘Data Warehouse’?
A. Data Lakes only store processed, structured data.
B. There is no difference; the terms are synonymous in cloud computing.
C. Data Warehouses are strictly used for real-time streaming data.
, D. Data Lakes store raw data in its native format until it is needed.
Answer: D
Conceptual Explanation: A data lake is a centralized repository that allows you to store all
your structured and unstructured data at any scale, whereas warehouses are typically
structured.
5. In machine learning, what does ‘Overfitting’ typically indicate about a model’s
performance?
A. High bias and low variance.
B. High bias and high variance.
C. Low bias and low variance.
D. Low bias and high variance.
Answer: D
Conceptual Explanation: Overfitting occurs when a model learns the detail and noise in
the training data to the extent that it negatively impacts the performance of the model on
new data. This is characterized by low bias (fits training data well) and high variance
(changes significantly with new data).
6. Which R package is the standard for creating complex, layered data visualizations?
A. readr
B. dplyr
TECHNIQUES - COMPREHENSIVE
PRACTICE EXAM QUESTIONS AND
ANSWERS
1. In the context of the Pandas library in Python, what is the primary difference between the
.loc and .iloc indexers?
A. .loc includes the start but excludes the end index, while .iloc includes both.
B. .loc is used for series only, while .iloc is used for dataframes.
C. .loc uses label-based indexing, while .iloc uses integer-based positional indexing.
D. There is no functional difference; they are aliases for the same indexing method.
Answer: C
Conceptual Explanation: .loc is label-based, meaning you specify the row or column
names. .iloc is integer-based, meaning you specify the numerical position.
2. When using SQL for data extraction, which clause is specifically used to filter the results of
an aggregate function?
A. WHERE
B. HAVING
,C. ORDER BY
D. GROUP BY
Answer: B
Conceptual Explanation: The HAVING clause was added to SQL because the WHERE
keyword could not be used with aggregate functions.
3. In R’s Tidyverse ecosystem, which function is primarily used to change the shape of data
from ‘wide’ to ‘long’?
A. pivot_longer()
B. mutate()
C. select()
D. filter()
Answer: A
Conceptual Explanation: pivot_longer() ‘lengthens’ data, increasing the number of rows
and decreasing the number of columns, which is a common requirement for tidy data.
4. What is the primary purpose of a ‘Data Lake’ compared to a ‘Data Warehouse’?
A. Data Lakes only store processed, structured data.
B. There is no difference; the terms are synonymous in cloud computing.
C. Data Warehouses are strictly used for real-time streaming data.
, D. Data Lakes store raw data in its native format until it is needed.
Answer: D
Conceptual Explanation: A data lake is a centralized repository that allows you to store all
your structured and unstructured data at any scale, whereas warehouses are typically
structured.
5. In machine learning, what does ‘Overfitting’ typically indicate about a model’s
performance?
A. High bias and low variance.
B. High bias and high variance.
C. Low bias and low variance.
D. Low bias and high variance.
Answer: D
Conceptual Explanation: Overfitting occurs when a model learns the detail and noise in
the training data to the extent that it negatively impacts the performance of the model on
new data. This is characterized by low bias (fits training data well) and high variance
(changes significantly with new data).
6. Which R package is the standard for creating complex, layered data visualizations?
A. readr
B. dplyr