Accounting Data Analytics with Python Coursera Quiz Answers

Coursera was launched in 2012 by Daphne Koller and Andrew Ng with the goal of giving life-changing learning experiences to students all around the world. In the modern day, Coursera is a worldwide online learning platform that provides anybody, anywhere with access to online courses and degrees from top institutions and corporations.

Join Now

Week 01: Accounting Data Analytics with Python Coursera Quiz Answers

Module 1 Quiz

Under which tab can you shut down a running notebook?

  • Files
  • Running
  • Clusters

Which menu tab in the Jupyter notebook contains the Restart & Run All command?

  • Kernel
  • File
  • Edit
  • Cell

Which is a cell magic?;

  • %ls
  • %matplotlib
  • %%writefile
  • %pwd

Which line magic allows inline plotting to be enabled in the notebook?

  • %matplotlib inline
  • %showplots inline
  • %matplotlib online
  • %showplots

In a notebook code cell, how do you enter edit mode from command mode?

  • By pressing Enter
  • By using the mouse to click on a cell’s editor area
  • Both of the above

What key combination can be used to execute a code cell and insert a new code cell below?

  • TAB-return
  • ALT-return
  • CTRL-return
  • SHIFT-return;

You can create a text document in a _______.

  • Markdown cell
  • Code cell

How do you add a line break after a line?

  • Add two or more whitespaces at the end of the line
  • Press Enter at the end of the line
  • Both of the above

Which choice creates a markdown header of level 2 containing the text “Header”?

  • # Header
  • ## Header
  • ##Header
  • ### Header

What character or characters can be used to show code block in markdown?

  • “`
  • ‘’’
  • “””
  • “’”

Week 02: Accounting Data Analytics with Python Coursera Quiz Answers

Module 2 Quiz

What does open source mean?

  • Anyone can view and/or make contributions to the item in question.
  • You can open the source code files.

Which of the following are Python keywords?

  • IF
  • For
  • Return
  • None of the above

True or False? The first character of a Python variable must be a letter or an underscore character.;

  • True
  • False

What is the data type of variable x in x = False?

  • bool
  • int
  • float
  • str

True or False? Functions make testing and debugging easier.

  • True
  • False

True or False? You can return a value from a Python function with print statement.

  • True
  • False

True or False? A Python function can have zero or more arguments.

  • True
  • False;

If a = 14 and b=7, what does this code evaluate to: a==b?

  • False
  • True
  • 0
  • 1
  • not equal

True or False? Indentation is not important for if statements.

  • True
  • False

What will be the output of this code snippet?

  • b is seven!
  • 7
  • 8
  • print(b)
  • print(a);

Week 03: Accounting Data Analytics with Python Coursera Quiz Answers

Module 3 Quiz

Which data structure is [1,2,3,4]?

  • list
  • tuple
  • numpy array
  • dictionary

Which of the following data structures are immutable, meaning that values cannot be changed in place?

  • list
  • tuple
  • dictionary

What would be the result of executing the code: “4 in [1,2,3]”?;

  • False
  • Yes
  • No
  • True

How would you access the 3rd element of a list called my_list?

  • my_list[3]
  • my_list(3)
  • my_list[2]
  • my_list(2)

Which list function can be used to add an element to the end of the list?

  • append()
  • pop()
  • sort()
  • add()

What would be the output of “one, two, three”.split()?

  • [‘one’, ‘two’, ‘three’]
  • [one]
  • “one two three”
  • [‘one two three’]

What would be the result of “[1,2,3].reverse()”?

  • {3,2,1}
  • np.array([3,2,1])
  • (3,2,1)
  • [3,2,1]

What type of Python loop runs as long as a condition is True?

  • for
  • while
  • wait
  • long;

Which of the following would loop through all integers from 1 to 10?

  • for i in range(10)
  • for i in range(1,10)
  • for i in range(1, 11)
  • while i in range(10)

What term best describes the following code: [x for x in range(10)]?

  • tuple
  • list comprehension
  • for loop
  • while loop

Week 04: Accounting Data Analytics with Python Coursera Quiz Answers

Module 4 Quiz

What is a module in Python?;

  • A file that contains Python definitions
  • Python code in a different code cell
  • Python code in a markdown code cell
  • Any Function inside of a Class

Which built-in function prints help for a python object?

  • dir()
  • help()
  • module()
  • function()

If my_list = [1, 2, 3], which of the following code prints help of list function append()?

  • dir(my_list.append)
  • dir(list.append)
  • help(my_list.append)
  • help(list.append)

True or False? Numpy is part of the standard data science Python distribution.

  • True
  • False

Which built-in numpy function allows you to create an array whose elements are initialized to zero?

  • empty
  • zeros
  • ones
  • linspace

What does following code create?

  • A numpy array that contains integers from 1 to 9
  • A numpy array that contains integers from 1 to 10
  • A Python list that contains integers from 1 to 9
  • A Python list that contains integers from 1 to 10

True or False? Pandas Series is a one-dimensional data structure.

  • True
  • False

Assuming df is a DataFrame, which code prints first 5 rows of the DataFrame?

  • df.head(5)
  • df.tail(5)
  • df.sample(5)

What is data type of one column of a DataFrame?

  • List
  • DataFrame
  • Series
  • Numpy array

Assume df is a DataFrame that has 4 columns, ‘C1’, ‘C2’, ‘C3’, ‘C4’, what is df[[‘C1’]]?

  • A Series which is column ‘C1’ of df
  • A DataFrame which has one column ‘C1’

Week 05: Accounting Data Analytics with Python Coursera Quiz Answers

Module 5 Quiz

What mode argument is used to open a text file to read?

  • b
  • r
  • br
  • w

What is the typical delimiter for a csv formatted file?

  • Comma
  • Tab
  • Space
  • Column;

Which Pandas function is used to read a pickled file and load the data in the file to a DataFrame?

  • to_pickle()
  • to_csv()
  • read_pickle()
  • read_csv()

Which Pandas DataFrame function is used to print a concise summary of the DataFrame?

  • info()
  • describe()
  • summary()
  • type()

Which DataFrame property is used to slice a dataframe with explicit indexes?

  • loc
  • iloc

Assume df is a DataFrame that has columns ‘Name’ and ‘Age,’ which code selects all rows in df that have Age greater than 20 and less than 30?

  • df[(df.Age>20) & (df.Age<30)]
  • df[df.Age>20 & df.Age<30]
  • Both of the above
  • None of the above

Assume df is a DataFrame that has columns ‘Name’ and ‘Age,’ what data type is df[‘Age’]?

  • Series
  • DataFrame
  • list
  • numpy array

Assume df is a DataFrame, in df.groupby(by=’column1’, as_index=False).agg({’column2’:’mean’}), what type of data is in column2?

  • Categorical data
  • Continuous data
  • Both of the above

What is median of the numbers in the list [1,2,3,4,5]?

  • 3
  • 4
  • 3.5

What is mean of the numbers in the list [1,2,3,4,5,6]?

  • 3
  • 4
  • 3.5;

Week 06: Accounting Data Analytics with Python Coursera Quiz Answers

Module 6 Quiz

Which argument of pyplot function subplots() is used to config the size of the figure?

  • size
  • figsize
  • figure_size
  • fig_size

Which Axis function is used to set label for x-axis in a plot?

  • set_xlabel
  • set_ylabel
  • set_xlim
  • set_ylim

Which Axis function is used to set limit for y-axis in a plot?

  • set_xlimit
  • set_ylimit
  • set_xlim
  • set_ylim

Which of the following plots are one-dimensional?

  • Rugplot
  • Boxplot
  • Histogram
  • Scatter plot

In boxplot, what do the two edges of the box represent?

  • 25% and 50%
  • 25% and 75%
  • 50% and 75%
  • 20% and 80%

True or False? In histogram, more bins will capture more noise, thus less bins are better.

  • True
  • False;

True or False? A histogram is a representation of the distribution of numerical data.

  • True
  • False

When the vertical values in a scatter plot, or y-axis, display an increase as the horizontal value, or x-axis, increases, the correlation is called?

  • Positive correlation
  • Negative correlation
  • No correlation

True or False? A scatter plot can be used to detect outliers.

  • True
  • False

True or False? A joint plot not only display patterns and relationships of two features but also shows distributions of each feature.

  • True
  • False

Week 07: Accounting Data Analytics with Python Coursera Quiz Answers

Module 7 Quiz

True or False? CRISP-DM is an iterative process.

  • True
  • False

True or False? Pandas has function to load data from an Excel file to a dataframe.

  • True
  • False

True or False? Assume df is a dataframe with missing values. After executing df.dropna(), there’s no missing values in df.

  • True
  • False

True or False? Assume df is a dataframe with missing values. After executing df.fillna(10), there’s no missing values in df.

  • True
  • False

Assume df is a dataframe that has a column “FirstName,” which code correctly convert values in “FirstName” column to all uppercase?

  • df[“FirstName”] = df[“First Name”].str.upper()
  • df.FirstName = df.FirstName.str.upper()
  • df[“FirstName”].str.upper()
  • df.FirstName.str.upper()

Which of the following datetime string matches this python datetime format: “”%m/%d/%Y”?

  • 12-31-18
  • 12-31-2018
  • 12/31/2018
  • 12/31/18;

Assume df is a dataframe and f() is a function that takes one argument, what is x in df.apply(lambda x:f(x))?

  • One value in desc column
  • One row in df
  • One column in df

True or False? When constructing a regression formula for statsmodels ols using dataframe column names, there can be whitespaces in the column names.

  • True
  • False

A categorical variable has 3 unique values, when create dummy variables for this feature, at lease how many dummy variables are needed for this variable?

  • 1
  • 2
  • 3
  • 4

In regression result, if p value of a coefficient is less than 0.05, it means the coefficient is?

  • Not significant at 95% confidence level
  • Significant at 95% confidence level

Week 08: Accounting Data Analytics with Python Coursera Quiz Answers

Module 8 Quiz

In RDBMS system, only valid data are written to the database. What is this feature called?

  • Atomicity
  • Consistency
  • Isolation
  • Durability

In RDBMS system, independent sets of database transactions are performed in such a way that they don’t conflict with each other. What is this feature called?

  • Atomicity
  • Consistency
  • Isolation
  • Durability

True or False? SQLite is an ACID-compliant database.

  • True
  • False

True or False? Values in a column that have foreign key constraint must be unique.

  • True
  • False

All rows from left table are placed into the joined table, and an inner join is performed with right table. Any row in the new table that does not have a match in right is padded with null values. What is this kind of join?

  • Inner join
  • Left outer join
  • Right outer join
  • Outer join

If you want to delete some data from a table, which SQL statement should you use?

  • DEL
  • DELETE
  • REMOVE
  • CLEAR

Which Python module deals with SQLite database?

  • sqlite3
  • sqlite
  • sql

Which Pandas DataFrame function writes a dataframe into a database?

  • write_database()
  • write_sql()
  • dump_sql()
  • to_sql()

When calling DataFrame function to_sql() to write a dataframe into database, which function argument setting will write dataframe index as a column?

  • index=False
  • index=True
  • as_index=False
  • as_index=True

When calling DataFrame function to_sql() to write a dataframe into database, if the table already exists, which function argument setting raises a ValueError?

  • if_exits=’fail’
  • if_exits=’append’
  • if_exists=’replace’

Review:

Based on our knowledge, we urge you to enroll in this course so you can pick up new skills from specialists. It will be worthwhile, we trust.

Leave a Comment