Podcast
Questions and Answers
What is the expected duration of the exam this year?
What is the expected duration of the exam this year?
- 150 minutes
- 240 minutes
- 2 hours and 55 minutes (correct)
- 80 minutes
How many questions will be included in this year's Part I of the exam?
How many questions will be included in this year's Part I of the exam?
- 14 questions
- 20 questions (correct)
- 16 questions
- 10 questions
What major difference is noted between this year's exam and last year's?
What major difference is noted between this year's exam and last year's?
- This year includes two parts instead of one.
- The total number of questions has decreased.
- Python is being taught instead of R. (correct)
- It is entirely open book this year.
What is stated about the questions that are irrelevant for this year?
What is stated about the questions that are irrelevant for this year?
What type of questions follow the initial multiple choice questions in the exam?
What type of questions follow the initial multiple choice questions in the exam?
Which of the following words correctly describes the built-in Python objects .flatten
, .mean
, .reshape
, and .rename
?
Which of the following words correctly describes the built-in Python objects .flatten
, .mean
, .reshape
, and .rename
?
If you assign x = '2012-02-28'
in Python, which data type is assigned to x
?
If you assign x = '2012-02-28'
in Python, which data type is assigned to x
?
Given the list a = [2, -4, 1, -5, 3, -10]
, which command will output -5
?
Given the list a = [2, -4, 1, -5, 3, -10]
, which command will output -5
?
Which statement correctly creates a Python list consisting only of integer values?
Which statement correctly creates a Python list consisting only of integer values?
What will be the output of calling f(2)
if the function is defined as follows: def f(x): z = 4; def g(y): return y + z; return x + g(x)
and z = 5
?
What will be the output of calling f(2)
if the function is defined as follows: def f(x): z = 4; def g(y): return y + z; return x + g(x)
and z = 5
?
Which pandas operation would successfully transform the city_income
DataFrame into a wide format with separate columns for male and female income?
Which pandas operation would successfully transform the city_income
DataFrame into a wide format with separate columns for male and female income?
When using the print(a[-5])
statement on the list a = [2, -4, 1, -5, 3, -10]
, what value is output?
When using the print(a[-5])
statement on the list a = [2, -4, 1, -5, 3, -10]
, what value is output?
In Python, which of the following data types includes a series of numeric values and is defined with square brackets?
In Python, which of the following data types includes a series of numeric values and is defined with square brackets?
What will city_income.groupby('gender').mean()
return when applied to the city_income
DataFrame?
What will city_income.groupby('gender').mean()
return when applied to the city_income
DataFrame?
Flashcards are hidden until you start studying
Study Notes
General Exam Information
- First year implementing Python in this class, differing from previous R course curriculum.
- Part I of the exam scheduled for 150 minutes with approximately 20 questions.
- Comments made for irrelevant questions that were not covered in the course material.
- No Part II for this year's exam.
Final Exam Overview
- Course: GBA 464: Programming for Analytics.
- Instructor: Yufeng Huang.
- Exam date: August 23, 2023.
- Total duration of exam: 2 hours and 55 minutes, split into two parts.
- Part I duration: 80 minutes, consisting of 14 questions worth 70 points.
- First six questions are multiple choice; subsequent eight involve coding or predicting output.
- Closed book exam, one letter-sized cheat sheet permitted.
- All students must comply with the Simon Academic Honesty Policy.
Question Highlights
- Question 1: Identifies built-in objects in Python; correct answer is Methods (D).
- Question 2: Assigning
x = "2012-02-28"
results in a String (C). - Question 3: Fetching the output
-5
from a list usingprint(a[3])
is correct (B). - Question 4: A list containing only integers is
vec = [90, 30, -199, 9]
(C). - Question 5: Function output from
f(2)
after considering variable scope, correct answer is 8 (A); variable scoping not covered in class, so students can skip this question. - Question 6: To convert DataFrame to wide format, the correct operation is
city_income.pivot(index='city', columns='gender', values='income')
(A).
Suggestions for Preparation
- Focus on understanding Python objects, data types, lists, and functions.
- Familiarize with pandas DataFrame manipulation, including pivot operations.
- Review academic honesty policy to maintain integrity during the exam.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.