The Most Skipped Question

Data with PythonEasy+10 XP+10

The Most Skipped Question

A school sent out a short questionnaire. The replies come back as a list of dictionaries, one per form, and every form has the same keys. A box left blank holds None.

Task: write most_skipped(replies). Find the column with the most blanks, and return a list of two things: its name and how many blanks it has (a whole number).

  • If two or more columns tie for the most blanks, return the one that comes first in the table.
  • If nothing was left blank at all, return ["", 0].

There is always at least one form.

Examples

replies = [{"name": "Ana", "age": 14, "club": None}, {"name": "Ben", "age": None, "club": None}, {"name": "Cara", "age": 15, "club": "chess"}]
returns ['club', 2]
replies = [{"name": "Dev", "pet": "cat"}, {"name": "Eli", "pet": "dog"}]
returns ['', 0]

Hints

Solve it to unlock the solution

Once your code passes every test, a reference solution shows up here so you can compare it with yours.

solution.py
CtrlEnterto run