Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Python Collections String Formatting with Dictionaries

Please rephrase or add detail to the instructions. It is not clear what is supposed to be included in the list to be returned.

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

Are you referring to the Teacher Stats challenge?

  • Task 1 of 4: Create a function named most_classes that takes a dictionary of teachers and returns the teacher with the most classes. Expected return: string containing teacher name
  • Task 2 of 4: Create a function named num_teachers that takes a dictionary of teachers and returns the number of teachers. Expected return: integer
  • Task 3 of 4: Create a function named stats that takes a dictionary of teachers and returns a list of lists where each list included is in the format [<code><name>, <number of classes></code>]. Expected return: list of list such as:
[['teach1', 5], ['othername', 3], ['yaname', 4]]
  • Task 4 of 4: Write a function named courses that takes the dictionary of teachers. It should return a list of all of the courses offered by all of the teachers. Expected return: list