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 3 out of 17 pages
Exam (elaborations)

BADM 211 Exam Prep. Questions and Answers

Document preview thumbnail
Preview 3 out of 17 pages

Exam of 17 pages for the course BADM 211 at BADM 211 (BADM 211 Exam Prep.)

Content preview

BADM 211 Exam Prep

Function - answer A block of code that takes inputs and may return an output.

Python only provides ___ built-in functions - answer68

print() - answer prints output to the screen

max() - answer Get the maximum number from a list of numbers.

len() - answer Get the length (number of items) in an object.

round() - answer Round a number to the nearest integer.

Python functions are categorized into 3 different types: - answer1. Modules
2. Packages
3. Libraries

Pandas - answeruseful for data manipulation & analysis.

Matplotlib & Seaborn are good for... - answercreating plots/data visualization

Scikit-learn machine learning algorithms are.. - answerefficiently coded in Python

Integer (int) - answerWhole numbers (without a decimal point)
- Ex: 2, 45

Float (float) - answerNumbers with a decimal point.
- Ex: 2.0, 45.6

String (str) - answerAn ordered sequence of characters.
- Anything in quotes:
- Ex: "Business analytics", "2", "year is 1999."

Boolean (bool) - answerLogical value
- Ex: True/False

What kind of data type are these:
"True"
"22.4"
45.0 - answerAnswers:
String
String

,Float

Variable - answera named piece of memory that can store a value course_title = "Intro
to Business Analytics"
- Why: So we can access the value later in the notebook.
- Notice: We use = (a single equals sign)
- Variable names are never in quotation marks.

3 Rules with Variables - answer1. Some words cannot be used as a variable name
(del).
- Python returns an error if you accidentally use one.
2. Python is case sensitive:
- The variable Bob is different than the variable bob.
- We'll typically use all lower-case variable names.
3. Variables cannot start with a number or contain spaces:
- Invalid variable names: 211badm and badm 211.
- Valid variable name: badm211

Variables: Common Errors - answer1. Variable not defined (not assigned a value).
2. Using == instead of =

Variables + Data Types - answer- Can assign different types of data to variables.
- How to check the data type of a variable.
*type() function

Arithmetic Operators
(Addition, Subtraction, Multiplication, Division, Exponentiation) - answer1. Addition (+)
- Ex: 3+2 = 5
2. Subtraction (-)
- Ex: 3-2 = 1
3. Multiplication (*)
- Ex: 3*2 = 6
4. Division (/)
- Ex: 3/2 = 1.5
5. Exponentiaion (**)
- Ex: 3 ** 2 = 9

Arithmetic Operators - answer1. Order of operations is the same as what you learned in
elementary school.
- Multiplication, division, and exponentiation take precedence over addition and
subtraction.
- When in doubt, use parentheses.
2. Spaces don't matter here*
- 2+3 is the same as 2+3
- But the second one is easier to read, so use spaces.

, *Note: Spaces (indentations) will matter in certain scenarios (if-else statements, for
loops, and functions)

Comparison Operators:
- Sometimes we want to compare two values and return a Boolean value. -
answerEqual to (==)
- Ex: 3 == 2 --> False
Not equal to (!=)
- Ex: 3 != 2 --> True
Less than (<)
- Ex: 3 < 2 --> False
Less than or equal to (<=)
- Ex: 3 <= 2 False
Greater than (>)
- Ex: 3 > 2 --> True
Greater than or equal to (>=)
- Ex: 3 >= 2 --> True

What will you see if you execute the following line of code in Python?
x = true
A. Nothing. We are defining a variable, so nothing is returned.
B. An error message
C. x
D. True - answerB. An error message

Prof. Luckman and I have a weekly poker game. We played 5 games. I have won three
times; she has won twice.

I want to add up our winnings and see who has won more in Python, but something's
not right. Debug the following code:

# My winnings
vv = 10 + 21 + 19
Her winnings
eat = 38 - 99
# Check if I earned more
vv < eal - answer# My winnings
vv = 10 + 21 + 19
# Her winnings
eat = 38 + 99
# Check if I earned more
vv > eal

What is a list? - answer- In life: a set of items written consecutively.
- In Python: An ordered collection of data, list elements don't have to be the same type.
- Ex: star = ['R2D2', 'Luke', 'BB-8', 66]

Document information

Uploaded on
April 2, 2026
Number of pages
17
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
CA$23.89

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.
Dreamer252
4.0
(117)
Sold
497
Followers
297
Items
21551
Last sold
1 month 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