Athletic shoes

Challenge
No

Help Cthulhu work out which athletic shoes goats like best. Download this starting workbook. Add your own code.

It starts like this:

Start

Each data record has three fields:

  • Goat name. Must not be empty. Must not contain just a question mark (?). That's how Cthulhu pollsters show the name is missing.
  • Fave brand. Must be one of three: Abibaaas, Remock, or Skreecherz. Other values are invalid. It's OK if the names are upper- or lowercase, or have extra spaces at the beginning and/or end.
  • Number of quads. Must be numeric, zero or more.

Output the counts and averages, like this:

Output

Write your code so that it automatically adjusts to the number of rows, as the data changes, without any changes to the code. The usual coding standards apply.

Submit your solution to this website as usual. Do not submit to Moodle.

Attachments
Where referenced