Chapter 2 quiz

Ten questions to bring the chapter together.

Work from question 1 to 10. Edit your Python box, click Run Code, review the result, then click Submit attempt. Reference answers unlock after all ten attempts are submitted. This records completion, not correctness. Each box runs independently. Progress is saved in this browser.

Submitted: 0 / 10

Question 1

The manager needs the Price column as a two-dimensional table. Print its type name and shape.

Write your answer, then run it.

Question 2

Print the Price value in the third row by numerical position, then print rows B through D using their labels.

Write your answer, then run it.

Question 3

The purchasing manager needs Central records with at least three units. Print only Store and Units for those records.

Write your answer, then run it.

Question 4

Report the total observed Sales and the number of records used. Preserve the recorded zero and exclude unknown Sales.

Write your answer, then run it.

Question 5

Create Revenue and ProductCost, then report total gross profit for these records.

Write your answer, then run it.

Question 6

These orders include one large transaction. Print the mean and median, then state which better describes the middle observation.

Write your answer, then run it.

Question 7

Print category totals and category means. Identify the category contributing the larger total and the category with the larger average.

Write your answer, then run it.

Question 8

Arrange these records chronologically and print percentage changes from the previous observation.

Write your answer, then run it.

Question 9

A manager asks for the recent average and the total accumulated so far. Print the final three-observation mean and cumulative total.

Write your answer, then run it.

Question 10

An investment increases 10% and then decreases 10%. Starting at HKD 100, calculate and print the ending value and total percentage return. Explain why adding the two rates fails.

Write your answer, then run it.

Reference answers are locked until all 10 attempts are submitted.