# Newbie question

**URL:** <https://www.ruby-forum.com/t/newbie-question/199142>\
**Category:** Ferret\
**Created:** [November 15, 2010, 3:39pm UTC](https://www.ruby-forum.com/t/newbie-question/199142 "2010-11-15T15:39:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [November 15, 2010, 3:39pm UTC](https://www.ruby-forum.com/t/newbie-question/199142/1 "2010-11-15T15:39:25Z")

</div>

Hello,

Newbie question here:

I have written a simple code to test my ruby knowledge. It is as  
follows:

* * *

class Mastermind

def k(a,b)  
v = a+b  
put v  
end

k(2,3)

end

* * *

When I run the class, I want to see the code return the number 5.  
However, when I run the code i get an error saying that the method K is  
undefined. What is wrong here?

---

<div class="post-metadata">

**Author:** ![samkas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/97f17d/32.png) [@samkas](https://www.ruby-forum.com/u/samkas)\
**Post date:** [November 15, 2010, 3:50pm UTC](https://www.ruby-forum.com/t/newbie-question/199142/2 "2010-11-15T15:50:39Z")

</div>

Nevermind - I figured it out. Thanks!

Kaustub Samant wrote in post #961568:

> Hello,
> 
> Newbie question here:
> 
> I have written a simple code to test my ruby knowledge. It is as  
> follows:
> 
> * * *
> 
> class Mastermind
> 
> def k(a,b)  
> v = a+b  
> put v  
> end
> 
> k(2,3)
> 
> end
> 
> * * *
> 
> When I run the class, I want to see the code return the number 5.  
> However, when I run the code i get an error saying that the method K is  
> undefined. What is wrong here?
