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 trialjamie threadgold
925 PointsCan some one help with this challenge please. I have the feeling that I'm nearly there... Thanks, Jamie
Can some one help with this challenge please. I have the feeling that I'm nearly there... Thanks, Jamie
def multiply(nums):
total = 1
for num in nums:
total = total * num
return total
2 Answers
Steve Hunter
57,712 PointsHi Jamie,
The first line of the challenge says Let's play with the *args pattern. but you've used nums
. If you switch that, your code is fine.
Make sense?
Steve.
jamie threadgold
925 PointsHi Steve,
I tried that initially; it didn't work..? Everything is fine now though.
Thanks again (it's the second time you've helped me now).
Jamie
Steve Hunter
57,712 PointsGlad it worked - I do check my code before I post it as I've made the mistake of not doing in the past and the grief is unbearable!!
The code challenges sometimes have a bit of a glitch so it can take a couple of attempts to get it to pass.
This challenge must have an alternative solution as the question mentions using slices. I've not figured that bit out yet.
Keep up the good work!
Steve.