Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

BADM 211 - Final Exam (UIUC) Questions and Answers

Beoordeling
-
Verkocht
-
Pagina's
17
Cijfer
A+
Geüpload op
02-04-2026
Geschreven in
2025/2026

BADM 211 - Final Exam (UIUC)

Instelling
BADM 211
Vak
BADM 211

Voorbeeld van de inhoud

BADM 211 - Final Exam (UIUC)

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. - answera. [[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:
a = [1,2,3,4,5,6,7,8,9]
Which of the following options would you choose? (Python List) - answera. 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) -
answera. 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. - answera. df.filter('Age')<40
**b. df[df.age<40]
c. df.sort_values("Age")<40
**d. df [df['Age']<40]

Get the proportion of male and female entries in this dataset (Data Manipulation with
Pandas). - answera. 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() - answera. 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) - answera.
print(df.iloc([2:3])
b. print(df.iloc[3:]
c. print(df.iloc([0:3])
**d. print(df.iloc[1:3])

Match the variable on the left with its datatype on the right. - answerp=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) - answera. 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) - answera. 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? - answera.
np.array([True, 1, 2, 3, 4, False])
b. np.array([0, 1, 2, 3, 4, 5])
c. np.array([1, 1, 2]) + np.array([3, 4, -1])
**d. np.array([4, 3, 0]) + np.array([0, 2, 2])

Assuming matplotlib.pyplot is imported as plt. Which of the following commands plots a
histogram of the variable named X? (Intro to matplotlib) - answera. plt.plot.hist(X)
**b. plt.hist(X)
c. plt.histogram(X)

, d. plt.plot(X)

How would you create a Figure with 6 Axes objects organized in 3 rows and 2 columns?
(matplotlib grammar) - answera. fig, ax = plt.axes((2, 3))
b. fig, ax = plt.subplots[3, 2]
c. fig, ax = plt.subplots((2, 3))
**d. fig, ax = plt.subplots(3, 2)

What is the correct way to calculate 2 to the power of 10? (python basics) - answera.
2^10
b. 2pow10
c. 2%*%10
**d. 2**10

Which one is NOT like the others? (python basics) - answer**a. dataframe
b. boolean
c. int
d. str
e. float

Consider the below code and fill in the blanks
# Create the areas list (python lists): areas = ["hallway", 11.25, "kitchen", 18.0, "living
room", 20.0, "bedroom", 10.75, "bathroom", 9.50]
# Print out second element from areas
print(areas[___])
# Print out last element from areas
print(areas[___]) - answera .2, 10
b. 2, -1
c. 1, -1
**d. 1, 9

Select correct option to print below output (python basics)
height_in_cms = [101, 101.2,108, 100,103]
height_in_cms = np.array(height_in_cms)
Output: (5,) - answer**a. height_in_cms.shape
b. height_in_cms.len()
c. height_in_cms.shape()
d. len(height_in_cms)

Fill in the following blank to inspect a dataframe "df". (loading data in pandas)
print (df.______) - answera. info
**b. info()
c. inspect
d. inspect()

You have a pandas dataframe denoted as 'df' with the following data:

Geschreven voor

Instelling
BADM 211
Vak
BADM 211

Documentinformatie

Geüpload op
2 april 2026
Aantal pagina's
17
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$15.99
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF


Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Dreamer252 NBursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
491
Lid sinds
3 jaar
Aantal volgers
297
Documenten
21465
Laatst verkocht
2 weken geleden

4.0

119 beoordelingen

5
63
4
23
3
18
2
2
1
13

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen