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

I can't seem to find the problem after checking over and over again. This is for My Basketball Stats tool.

Hi Guys Please could you help me, i'm really struggling to find my problem. I keep getting a Syntax error : 'return' outside function error message for line 51 and i can't seem to find a solution. and i have an indentation error on line 123 but i've changed it so many times i can't seem to find whats wrong with my code.

You're help would be much appreciated.

https://w.trhou.se/aj7hxm18hk

1 Answer

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

All lines 35-51 need to be indented to be within the divide_players function.

There are many other lines that are not intended properly. Please only use 4-space indenting, and align if/elif/else statements.

Post back after you have corrected the indentation with an updated workspace link.

Tag me if you need more help. Good luck!!!