good to know, thanks. I got confused with the .to_s methods we used
yesterday to convert user input to a string. I got confused and thought all
user input would come into the method as a string and I would need to
convert it to another datatype. Thanks for the heads up!


On Wed, Jan 8, 2014 at 9:24 AM, David Fisher <notifications@github.com>wrote:

> In quiz.rb:
>
> > @@ -1,5 +1,33 @@
> >  # Question 1: Create a method called 'square' which takes a parameter `x` and squares it
> > +def square(x)
> > +	return x.to_i ** 2
>
> Be careful with casting to an integer here. If the user had input a float
> like 2.2, then it would return 4 as the answer, which isn't the right
> answer.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/tibbon/ga-method-conditional-quiz/pull/17/files#r8724992>
> .
>



-- 
Mike Stone
mikestone14@gmail.com
781.856.1156