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 trialDavid Marquardt
13,931 PointsPython 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???
def multiply(5, 5, *args):
total = base
for num in args:
total * num
return total
2 Answers
Gabriel Plackey
11,064 PointsI 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
10,418 Pointsif 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
Darrin Spell Jr
Full Stack JavaScript Techdegree Student 10,303 PointsDarrin Spell Jr
Full Stack JavaScript Techdegree Student 10,303 PointsTrust me you aren't the only one -__-