## 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.

# Working in work spaces but not in code challenge section

My function most_courses(var) does what is asked for in work spaces but I get an error saying it cant find most_courses

teachers.py
```# 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(var):
return len(var.keys())

def num_courses(var):
num = 0
for item in var.values():
num += len(item)

return num

def courses(var):
c = []

for item in var.values():
c.extend(item)
return c

def most_courses(var):
mx = 0
ky = "N/a"
vl = "N/a"

for item in var:
v = var[item]
if ( mx < len(var[item])):
mx = len(t.values())
ky = item
vl = v
return ky
```