Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Takuji Sakashita
3,372 PointsCreate a method called hello that takes one argument.
what should i do to answer this question?
def hello(a,b)
puts a+b
end
2 Answers

Jason Anders
Treehouse Moderator 145,623 PointsHi Takuji,
Your code is correct syntactically, but it is not what the challenge asked for. The challenge wants you only to
Create a method called
hello
that takes one argument.
But, in your code, the method has 2 arguments instead of just one as per the instructions.
Second, the challenge just want a method, it did not ask for a puts
statement or anything else to be inside the body of the method.
If you fix those two things up, the code will pass. :)
Keep Coding!

Takuji Sakashita
3,372 PointsThank you for your answer!
Brian Pedigo
23,469 PointsBrian Pedigo
23,469 PointsIt looks like you put more effort into answering the question than is required. To pass this challenge just create a method that takes one argument. Notice the question doesn't ask for any internal logic in the method! Therefore, to pass this you could simply put.