Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 36 pages
Exam (elaborations)

BADM 211 - Final Exam 2026 (UIUC) Questions With Correct Answers

Document preview thumbnail
Preview 4 out of 36 pages

BADM 211 - Final Exam 2026 (UIUC) Questions With Correct Answers

Content preview

1|Page




BADM 211 - Final Exam 2026 (UIUC) Questions
With Correct Answers

A list can contain any Python type. But a list itself is also a Python type.
That means that a list can also contain a list! Python is getting funkier by
the minute, but fear not, just remember the list syntax: (Python List
Assignment)
my_list = [el1, el2, el3]
Can you tell which ones of the following lines of Python code are valid
ways to build a list? Please choose all correct answers. - ANSWER -a.
[[1, 2, 3], [4, 5, 7]]
b. [1 + 2, "a" * 5, 3]
c. [1, 3, 4, 2]
**d. All of the above


Assume, you are given two lists:
a = [1,2,3,4,5]
b = [6,7,8,9]
The task is to create a list which has all the elements of a and b in one
dimension.
Output:



pg. 1

,2|Page


a = [1,2,3,4,5,6,7,8,9]
Which of the following options would you choose? (Python List) -
ANSWER -a. a.join(b)
b. a "+" b
c. a.append(b)
**d. a.extend(b)


You want to print the top 5 ids with highest income from this dataset
(dataframe shows a partial view):


What should be the correct sequence of commands? (Data
Manipulation with Pandas) - ANSWER -a. df.sort_values(), df.head()
b. df.head(), df.sort_values()
**c. df.sort_values("Income"), df.head()
d. df.sort_values("Age"), df.head()


Filter all the rows where age is less than 40 in this dataset (Data
Manipulation with Pandas).


Choose all correct answers. - ANSWER -a. df.filter('Age')<40
**b. df[df.age<40]
c. df.sort_values("Age")<40
**d. df [df['Age']<40]


pg. 2

,3|Page




Get the proportion of male and female entries in this dataset (Data
Manipulation with Pandas). - ANSWER -a. df["Gender"].numbers()
**b. df ["Gender"].value_counts(normalize=True)
c. df["Gender"].counts()
d. df["Gender"].value_counts()


Complete the following command to get the mean income of each
gender from this dataset. (Data Manipulation with Pandas)


Complete this command:
df.______ ("_____")["______"].mean() - ANSWER -a. groupby, age,
income
b. groupby, age, gender
c. groupby, income, gender
**d. groupby, gender, income


You have the following dataframe df: (Data Manipulation with Pandas) -
ANSWER -a. print(df.iloc([2:3])
b. print(df.iloc[3:]
c. print(df.iloc([0:3])
**d. print(df.iloc[1:3])




pg. 3

, 4|Page


Match the variable on the left with its datatype on the right. - ANSWER
-p=3 -- int
q="False" -- str
r=True -- bool


Suppose you have the following data in a csv file named as sales.csv :
(Data Manipulation with Pandas) - ANSWER -a. pd.readcsv("sales.csv")
b.pd. read_excel("sales.csv)
**c. pd.read_csv("sales.csv")
d. pd.read_excel("sales.xlsx")


Use the table and choose the correct code to generate the output
shown. (Data Manipulation with Pandas) - ANSWER -a.
df['Sold_Qty'].mean()
**b. df['Sold_Qty'].max()
c. df['Sold_Qty'].min()
d. df['Sold_Qty'].sum()


Have a look at this line of code: (python basics)
np.array([True, 1, 2]) + np.array([3, 4, False])
Can you tell which code chunk builds the exact same Python object? -
ANSWER -a. np.array([True, 1, 2, 3, 4, False])
b. np.array([0, 1, 2, 3, 4, 5])



pg. 4

Document information

Uploaded on
March 5, 2026
Number of pages
36
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
CA$28.51

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
AceExam1
3.5
(11)
Sold
43
Followers
1
Items
3349
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions