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

Why am I getting an unresolved reference error? [Solved]

why is there a not defined error for work_efficiency?

def time_worked(assignments, time_working):
    work_efficiency = assignments / time_working
    return work_efficiency


amount_done = time_worked(5, 5)

print("your work value is {}".format(amount_done))

thanks in advance!

update: it turns out that annother part of the code was the problem, after fixing that it works perfectly.

Chris Freeman
Chris Freeman
Treehouse Moderator 68,454 Points

The code works correctly for me as well. Can you post the full stacktrace error message you’re seeing?

1 Answer

Your code looks fine and doesn't give me any errors when I run it. Do you have inconsistent indentation in your code that Markdown corrected?