stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Coding Concepts Flashcards | StudBud
Explore
/
Coding Concepts
Coding Concepts
30 terms
·
StudBud Administration
·
8 plays
Imported from external platform
Flashcards
30 cards
F
Practice quiz
P
Host live
L
Questions
30
Answers
1
What is the purpose of a "target variable" in supervised machine learning?
To cluster similar data points.
To represent the output we want to predict.
To reduce the dimensionality of the data.
To define the input features.
2
What is the purpose of the
len()
function in Python?
To determine the length of a string or list.
To sort a list.
To find the maximum value.
To calculate the sum of numbers.
3
What is "mean absolute error" (MAE) used for in machine learning?
To reduce overfitting.
To evaluate the performance of a regression model.
To classify data points.
To cluster data points.
4
Which SQL keyword is used to sort the result set of a query?
GROUP BY
ORDER BY
WHERE
HAVING
5
What is a Pandas DataFrame?
A SQL query.
A one-dimensional array.
A machine learning model.
A two-dimensional labeled data structure.
6
What is the purpose of the Pandas method
df.describe()
?
Displays the first few rows of a DataFrame.
To drop rows with missing values.
To calculate summary statistics for numerical columns.
To rename the columns of the DataFrame.
7
What is a "conditional statement" used for?
To perform arithmetic operations.
To make decisions based on conditions.
To create user interfaces.
To define data structures.
8
What is a "variable" in programming?
A function definition.
A type of loop.
A named storage location that can hold a value.
A constant value.
9
In Pandas, what does
df.head()
do?
Displays the first few rows of a DataFrame.
Displays the last few rows of a DataFrame.
Calculates the mean of each column.
Renames the columns of a DataFrame.
10
What is the purpose of the SQL DISTINCT keyword?
To retrieve unique values from a column.
To sort rows based on a column.
To filter rows based on a condition.
To group rows based on a column.
11
What is the difference between "source code" and "executable code"?
Source code is visual, executable code is textual.
Executable code is for humans, source code is for machines.
There is no difference.
Source code is for humans, executable code is for machines.
12
What is a "function" or "method" in programming?
A reusable block of code that performs a specific task.
A way to store data.
A type of variable.
A type of loop.
13
Which SQL keyword is used to get data from a table?
INSERT
SELECT
DELETE
ALTER
14
What is the purpose of splitting data into "training" and "validation" sets?
To improve the speed of the model.
To evaluate the model's performance on unseen data.
To simplify the data.
To reduce the size of the data.
15
In Python, which keyword is used to define a function?
def
create
function
define
16
What is the output of the following Python code snippet?
for i in range(3): print(i)
1 2
0 1 2
0 1 2 3
1 2 3
17
Which of the following is a valid way to create a list in Python?
[1, 2, 3]
"1, 2, 3"
(1, 2, 3)
{1, 2, 3}
18
What is the output of the following Python code?
print(2 + 3 * 4)
14
9
12
20
19
What does "syntax" refer to in programming?
The logic of an algorithm.
The user interface of a program.
The speed of code execution.
The rules that govern the structure of a programming language.
20
What is a "Boolean" data type?
A data type representing decimal numbers.
A data type representing text.
A data type representing true or false values.
A data type representing whole numbers.
21
What is the primary goal of supervised learning?
To cluster similar data points.
To find patterns in unlabeled data.
To reduce the dimensionality of data.
To predict a target variable based on input features.
22
What is the fundamental purpose of writing code?
To store large amounts of data.
To instruct a computer to perform specific tasks.
To create visually appealing interfaces.
To design computer hardware.
23
Which Pandas function is used to read a CSV file into a DataFrame?
read_excel()
read_sql()
read_csv()
load_data()
24
What is a "data type"?
A programming error.
A type of loop.
A kind of value a variable can hold and be used for.
A method of organizing files.
25
Which SQL aggregate function is used to calculate the average of a column?
SUM()
COUNT()
AVG()
MAX()
26
What is a "feature" in machine learning?
An input variable used to make predictions.
A metric for evaluating model performance.
A type of model.
The predicted output.
27
How would you replace all missing values in a Pandas DataFrame df with the value 0?
df.remove(NaN, 0)
df.fillna(0)
df.drop(NaN)
df.replace(NaN, 0)
28
Coding Concepts
: What is "flow control" in programming?
The size of data stored in memory.
The order in which statements are executed in a program.
The design of user interfaces.
The speed of code execution.
29
What is the purpose of the GROUP BY clause in SQL?
To aggregate data into groups.
To combine rows from multiple tables.
To filter rows.
To sort rows.
30
What is the purpose of "comments" in code?
To explain the code to human readers.
To optimize code performance.
To execute specific functions.
To store data.