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
Hara Gopal K
Courses Plus Student 10,027 PointsChallenge Task 2 of 4: num_teachers
for this task, i tried the following. this works in my shell but not on the website. is something wrong with the code ? or should i use a loop...
def num_teachers (teachers_dict):
return len(teachers_dict.keys())
thank you hara
1 Answer
Steven Parker
243,656 Points
Your solution is correct.
Good job!
If it doesn't pass the challenge, perhaps there was a typo when you entered it. Try again, and you can just copy from above and paste it in.
Also be sure that the task 1 solution is still intact. Each task should be added to the previous solution(s).
Hara Gopal K
Courses Plus Student 10,027 PointsHara Gopal K
Courses Plus Student 10,027 PointsThank you Steven :)