Session Ready
Exercise

Testing well: Boundary values

Remember row_to_list()? It takes a row containing housing area and prices e.g. "2,041\t123,781\n" and returns the data as a list e.g. ["2,041", "123,781"].

A row can be mapped to a 2-tuple (m, n), where m is the number of tab separators. n is 1 if the row has any missing values, and 0 otherwise.

For example,

  • "123\t456\n" \(\rightarrow\) (1, 0).
  • "\t456\n" \(\rightarrow\) (1, 1).
  • "\t456\t\n" \(\rightarrow\) (2, 1).

The function only returns a list for arguments mapping to (1, 0). All other tuples correspond to invalid rows, with either more than one tab or missing values. The function returns None in all these cases. See the plot.

This mapping shows that the function has normal behavior at (1, 0), and special behavior everywhere else.

Instructions 1/4
undefined XP
  • 1
  • 2
  • 3
  • 4

Question

Which are the boundary values for this function, according to the plot?

Possible Answers