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 trialSISLEY NGUYEN
1,835 PointsI need you to write a function named product. It should take two arguments, you can call them whatever you want, and the
I need you to write a function named product. It should take two arguments, you can call them whatever you want, and then multiply them together and return the result.
def product(1,2):
return ( 1 +2) * 1
ave =product( 1,2)
2 Answers
Script Code
6,631 PointsThe arguments are variables within your function's local scope (just assume for now).
For this challenge you are asked to use 2 arguments. def product (applepie, honeyoat): return applepie*honeyoat
Nick Osborne
4,612 PointsHi, the arguments should be variables:
def product(arg1, arg2):
return arg1*arg2