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 trialVictoria Moser
2,668 PointsDefine multiply method that takes 2 arguments
I did:
def multiply (a, b)
end
No idea what's wrong keep getting that it's wrong. Please help! Thanks in advance!
def multiply (a, b)
end
2 Answers
Allison Hanna
36,222 PointsHi, Your setup is fine, now you just need to add the body of the function. Specifically, when the method is invoked, what should happen?
def multiply (a, b)
a * b
end
And now if someone calls the function, for example multiply(2, 4)
the output will be 8.
Allison Hanna
36,222 PointsI just went to look at the challenge. Task 1 won't pass if you've deleted the subtract
function. You need to keep both in order to pass.
def subtract (a, b)
end
def multiply (a, b)
end
Victoria Moser
2,668 PointsVictoria Moser
2,668 PointsI did that too and I still get the following :
Oops! It looks like Task 1 is no longer passing. Get Help