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 Python Basics (Retired) Putting the "Fun" Back in "Function" Functions

Not sure how to complete Stage 6 Putting the "fun" back in "function" Code challenge... I just don't get the directives.

I'm trying to find the logic behin the question, I just feel like there's a lot off missing information on how to write the code

Chris Shaw
Chris Shaw
26,676 Points

Hi Sylvie,

All the videos prior to this challenge have the information required to continue, while it might seem information is missing it's there and relates perfectly to the question.

Is there specific parts of the question that is troubling you or the whole challenge?

3 Answers

Daniel Johnson
Daniel Johnson
104,132 Points

I think the Python courses don't seem to walk through the challenges as good as some of the other courses do. The information is too spread out and not included in the videos directly before the challenges. This can make it quite difficult for someone just learning Python.

functions.py
def add_list(args):
    total = 0
    for arg in args:
      total += arg
    return total

def summarize(args):
    total = add_list(args)
    return "The sum of {} is {}.".format(args, total)

I agree with Daniel. I don't think there's anything wrong with expecting students to look stuff up on their own, but there is no easy way to do that with a piecemeal video format. Treehouse should either provide additional resources or rewrite these challenges.

Im so glad you posted this. I was feeling like I had a learning disability. lol I agree with you, it in the videos there wasn't any mention of adding anything and that's just what the challenge called for. Thanks for saving my waning sanity. lol

I was having the exact same thoughts while following this course. Suddenly you had to use the sum function, without even knowing it existed. It wouldn't have been a problem, when we were told to look it up in the documentation or something, but now it was complete out of the nowhere.

Oh wait, my bad. In the code above you are using a different solution, I read another forum question where somebody was using the sum function to add the numbers ;-) It makes a little more sense now.