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 Collections (2016, retired 2019) Tuples Packing

Python Collections Packing Challenge task

Am I the only one that feels like the challenge tasks aren't being explained in videos prior to the challenge tasks for python??? Or am I just not getting it???

twoples.py
def multiply(5, 5, *args):
    total = base
    for num in args:
        total * num
    return total

Trust me you aren't the only one -__-

2 Answers

Gabriel Plackey
Gabriel Plackey
11,064 Points

I have occasionally felt the same about the python ones. For your coded above I'm not sure where you are getting total from, but you should be using product, as it wants you to return product.

def multiply(*args):
    product = 1
    for arg in args:
        product *= arg
    return product
Esmelin Lopez
Esmelin Lopez
10,418 Points

if you to include base you must first put it here --> def multiply(base *args): total = base for num in args: this should be -->total *= num -- or total = total * num -- to hold the new value return total