Docsity

BADM 211 Midterm Exam Practice Problems with Solutions, Exams of Business Administration

Toggle sidebar
bg1
BADM 211 Midterm Review (Practice Problems
With Solutions)
Terms in this set (17)
Save
What is the output of the
following lines of code:
word = "BADM"
word = 211
print(word)
211
What will the result of the
following code?
2 * "3.0"
"3.03.0"
Which of the following
pandas methods will
report summary statistics
of numeric columns?
A. head()
B. tail()
C. info()
D. describe()
D. describe()
pf3
pf4
pf5

Partial preview of the text

Download BADM 211 Midterm Exam Practice Problems with Solutions and more Exams Business Administration in PDF only on Docsity!

BADM 211 Midterm Review (Practice Problems

With Solutions)

Terms in this set (17)

Save

What is the output of the following lines of code: word = "BADM" word = 211 print(word)

What will the result of the following code? 2 * "3.0"

Which of the following pandas methods will report summary statistics of numeric columns? A. head() B. tail() C. info() D. describe()

D. describe()

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? A. df["animal"].value_counts( ) B. df["animal"].value_counts( normalize=True) C. df.value_counts().animal() D. value_counts(df["animal"])

A. df["animal"].value_counts()

Which option will help us select elements "a" and "b" in the list L = ["a", "b", "c"]? (Select all that apply.) A. L[0:2] B. L[1:2] C. L[-3:-2] D. L[-3:-1]

A. L[0:2] AND D. L[-3:-1]

Which of these will help us select two columns, c and c2, from the dataframe df? A. df[c1,c2] B. df["c1", "c2"] C. df[["c1","c2"]] D. df("c1", "c2")

C. df[["c1","c2"]]

How would you return the enrollment count in business from this dictionary?

Univ = {'business': {'name':'gies', 'enrollment': },'engineering':{ 'name':'grainger', 'enrollment':4500}}Univ = {'business':{'name':'gies', 'enrollment': },'engineering':{ 'name':'grainger', 'enrollment':4500}}

Univ['business']['enrollment']

What is the code for creating a scatterplot in seaborn, imported as sns?

sns.scatterplot()

What figure shows the distribution of a categorical variable? A. Count plot B. Histogram C. Scatter Plot D. Boxplot

A. Count plot

To filter a dataframe df such that a column, col1, has values only greater than 100, we run the following code: df[df['col1'] > 100] What will be the outcome if we only run the code within the outer set of square brackets, i.e., df['col1'] > 100? A. The filtered dataframe df will be saved B. The filtered dataframe will be printed C. A series of True and False will be printed. D. Error message will be shown

C. A series of True and False will be printed.

What is the interquartile range (IQR)?

IQR = Q3 - Q

Suppose you have a dataset of box office revenues for the top 1000 movies. The dataset includes the genre of each movie. Which chart could you use to show average revenues by genre? A. Barchart B. Scatterplot C. Grouped Histogram D. Grouped Boxplots

A. Barchart

Which of the following statements is TRUE? (Select all that apply.) A. Seaborn is built on top of Matplotlib. B. When defining a function, arguments are always necessary. C. Each column in a pandas dataframe is a Series. D. Dataframe methods and attributes cannot be applied to Series. E. Scatter plots can help visualize the relationships between a categorical variable and a numeric variable. F. The agg() method cannot calculate a single summary measure.

A and C