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 trialAntonie Huang
985 PointsHow do I set 2 augment and return it?
How do I set 2 augment and return it?
def product(hahaha, hehehe):
2 Answers
Chris Freeman
Treehouse Moderator 68,454 PointsWhen the challenge asks to create a function, you don't have to create the variables to call it. The challenge checker will take car of that.
So you are on the right path:
# Write function named product.
# It should take two arguments,
# you can call them whatever you want....
def product(hahaha, hehehe):
# and then multiply them together
result = hahaha * hehehe
# and return the result.
return result
Edit: Oops! Multiplication (*) not Addition (+).
Haider Ali
Python Development Techdegree Graduate 24,728 PointsHi there. Your function needs to take in 2 arguments and multiply them together using the multiplication operator which is an asterisc:
def product(a, b):
return a*b
Haider Ali
Python Development Techdegree Graduate 24,728 PointsHaider Ali
Python Development Techdegree Graduate 24,728 PointsMultiplication operator :)
Chris Freeman
Treehouse Moderator 68,454 PointsChris Freeman
Treehouse Moderator 68,454 PointsYikes! That's what I get when trying to answer forum questions on my iPhone. Answer updated. Thanks.
Antonie Huang
985 PointsAntonie Huang
985 PointsThank you guys.