Skip to content

Latest commit

 

History

History
141 lines (101 loc) · 2.77 KB

File metadata and controls

141 lines (101 loc) · 2.77 KB

Session 8 Homework Quiz (PySpark Analytics Report)

Question 1

What is the main goal of the Session 8 homework?

  • Build a small PySpark SQL-style analytics report
  • Install only pandas and stop
  • Write a web page with no data
  • Delete the Spark session files

Answer: 1 Type: single Time: 45 Explanation: The homework asks students to use PySpark to create data, query it, and explain results.

Question 2

Where should students usually run the homework?

  • Google Colab
  • A spreadsheet cell only
  • The .git folder
  • A browser bookmark

Answer: 1 Type: single Time: 40 Explanation: The homework is designed for Google Colab unless students completed local setup.

Question 3

How many rows should the homework DataFrame have at minimum?

  • 4
  • 8
  • 12
  • 1000

Answer: 3 Type: single Time: 40 Explanation: The homework requires at least 12 rows.

Question 4

Which item is required before using Spark SQL on a DataFrame?

  • Register the DataFrame as a temporary view
  • Convert all rows into screenshots
  • Delete every calculated column
  • Rename the notebook to requirements.txt

Answer: 1 Type: single Time: 45 Explanation: Spark SQL queries need a table or view name, such as a temporary view.

Question 5

What is a calculated column?

  • A new column made from existing data or logic
  • A column that cannot be queried
  • A quiz answer hidden in the DataFrame
  • A folder inside solutions

Answer: 1 Type: single Time: 45 Explanation: A calculated column is derived from other values, such as quantity * unit_price.

Question 6

How many SQL queries should the homework include at minimum?

  • 1
  • 2
  • 4
  • 10

Answer: 3 Type: single Time: 40 Explanation: The homework asks for at least 4 SQL queries.

Question 7

Which SQL clause is required for at least one grouped summary?

  • GROUP BY
  • INSTALL BY
  • NOTEBOOK BY
  • SPARK BY

Answer: 1 Type: single Time: 40 Explanation: GROUP BY creates grouped summaries such as revenue by city or average score by track.

Question 8

Which SQL clause is required for at least one sorted result?

  • ORDER BY
  • VIEW BY
  • CREATE BY
  • PYTHON BY

Answer: 1 Type: single Time: 40 Explanation: ORDER BY sorts query results.

Question 9

What should students avoid using for the main homework analytics queries?

  • pandas
  • Spark SQL
  • PySpark DataFrames
  • Google Colab

Answer: 1 Type: single Time: 45 Explanation: The homework is PySpark practice, so pandas should not be used for the main analytics queries.

Question 10

What should the homework reflection include?

  • What felt easier or harder in Spark SQL compared with DataFrame syntax
  • Only the Python version number
  • A list of unrelated websites
  • A deleted copy of the notebook

Answer: 1 Type: single Time: 50 Explanation: The reflection asks students to compare the SQL and DataFrame approaches.