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 trialBenjamin Miller
4,344 PointsCreate a method called "subtract" that takes two arguments.
When i did this, it didn't work! so.... any ideas?
def multiply(warg, barg)
end
Benjamin Miller
4,344 PointsOh, oops i put in the wrong code. The thing is though, when i got to the multiply part it said that subtract hadn't worked! Whaaaaa!!!!?????
Alexander Davison
65,469 PointsI'll try the challenge out. Just wait...
Alexander Davison
65,469 PointsSorry for the late response, but I got it! The answer is you replaced the method. You should of written it below the code you had written before. The answer:
def subtract(num1, num2)
end
def multiply(num1, num2)
end
~ Hope it helps! xela888
Benjamin Miller
4,344 Pointsomg, Thanks!!!!! LIFESAVER!
Alexander Davison
65,469 PointsNo problem!
2 Answers
Kenny Moreno
3,406 PointsChallenge Task 2 of 2
Create a method called "multiply" that takes two arguments.
Oops! It looks like Task 1 is no longer passing.
method.rb
def multiply(num1, num2)
end
It does not work I am paying my money in vain please help your web app is not working - thanks!
Marwan Hassama
865 PointsSurely numbers instead of 'num1, 'num2' should aslo work. Cant numbers be arguments?
Alexander Davison
65,469 PointsAlexander Davison
65,469 PointsIt is asking you to make a method called subtract, not multiply. You should do this instead: