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!
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
Anthony RuvinovCourses Plus Student 7,638 Points
Create a function named multiply that takes any number of arguments. Return the product (multiplied value) of all of the
Can someone please help me I am really lost on this.
Philip Schultz11,437 Points
Hey, It is asking you to make a function that accepts an *args argument. Then it wants you to loop through it and multiply all of the values.
def multiply(*args): product = 1 for item in args: product *= item return product
Write a function, named multiply, that takes a value as an argument, then returns that value multiplied by 2.