BADM 211 2026
Both "=" and "==" perform the same function in Python. - answer False
What is the output of the following lines of code:
word = "BADM"
word = 211
print(word) - answer211
Which of the following is not a valid variable type in Python? – answer Double String
What will be the result of the following code?
2 * 3.0 - answer6.0
Which code will filter the data frame df for rows where the column "col1" has values that
are NOT equal to 5? – answer df[df["col1"] != 5]
Which of the following pandas methods will report summary statistics of numeric
columns? - answerdescribe()
Suppose we have a data frame df, which includes a column animal. I would like to count
the number of times each animal appears in the column, e.g.
Elephant: 8, Zebra: 7, etc.
Which of the following commands can I use to do that? -
answerdf["animal"].value_counts()
Assuming dataframe df is properly defined, what line of code would output the first 10
rows of data? - answerdf.head(10)
Which option will help us select elements "a" and "b" in the list L = ["a", "b", "c"]? (Select
all that apply.) - answerL[0:2]
L[-3:-1]
Which of these will help us select two columns, c1 and c2, from the dataframe df? -
answerdf[["c1", "c2"]]
What will be the output of List1[-2] if List1 is defined as below?
List1 = ['Hello', 3, 'BADM', 211, 'Professor', 3.14] - answer'Professor'
A list can hold multiple types of data. - answerTrue
What would the following code output?
var = [1, 2, [3], [5], [4, 6, [7, 8]]]
Both "=" and "==" perform the same function in Python. - answer False
What is the output of the following lines of code:
word = "BADM"
word = 211
print(word) - answer211
Which of the following is not a valid variable type in Python? – answer Double String
What will be the result of the following code?
2 * 3.0 - answer6.0
Which code will filter the data frame df for rows where the column "col1" has values that
are NOT equal to 5? – answer df[df["col1"] != 5]
Which of the following pandas methods will report summary statistics of numeric
columns? - answerdescribe()
Suppose we have a data frame df, which includes a column animal. I would like to count
the number of times each animal appears in the column, e.g.
Elephant: 8, Zebra: 7, etc.
Which of the following commands can I use to do that? -
answerdf["animal"].value_counts()
Assuming dataframe df is properly defined, what line of code would output the first 10
rows of data? - answerdf.head(10)
Which option will help us select elements "a" and "b" in the list L = ["a", "b", "c"]? (Select
all that apply.) - answerL[0:2]
L[-3:-1]
Which of these will help us select two columns, c1 and c2, from the dataframe df? -
answerdf[["c1", "c2"]]
What will be the output of List1[-2] if List1 is defined as below?
List1 = ['Hello', 3, 'BADM', 211, 'Professor', 3.14] - answer'Professor'
A list can hold multiple types of data. - answerTrue
What would the following code output?
var = [1, 2, [3], [5], [4, 6, [7, 8]]]