Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Vuk Spasojevic
9,491 PointsWhat I am doing wrong. Please help
Code returns list of all courses but check return Bummer Couldn't find 'courses'. Yet function is named courses as requested
# The dictionary will look something like:
# {'Andrew Chalkley': ['jQuery Basics', 'Node.js Basics'],
# 'Kenneth Love': ['Python Basics', 'Python Collections']}
#
# Each key will be a Teacher and the value will be a list of courses.
#
# Your code goes below here.
def num_teachers(dict):
num_teachers = 0
for teacher in dict:
num_teachers += 1
return num_teachers
def num_courses(dict):
num_courses = 0
for teacher in dict:
num_courses += len(dict[teacher])
return num_courses
def courses(dict):
courses_list = []
for teacher in dict:
for course in dict[teacher]:
courses_list.append(course)
return course_list

Peter Smart
9,150 PointsI'm still super new at this, but should return course_list be return courses_list?
2 Answers

chrisarasin
4,614 PointsYour list name is "courses_list" but you're returning "course_list" without an s on courses.

Steve Hunter
57,682 PointsGood spot!

Vuk Spasojevic
9,491 PointsAnd officially I am super idiot. Thank you all for help.
Steve Hunter
57,682 PointsSteve Hunter
57,682 PointsHi there,
It'll say "couldn't find 'courses'" if the code won't run due to a syntax error.
I'll have a look and see what I can help you with.
Steve.