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 trialHeather Stone
5,784 PointsUsing the sqrt method in the Math module, assign the value of the square root of 9 to the variable @sqrt.
This should be very simple!
Math::E = @e Math::PI = @PI
I set these variables to these values and the code is accepted, but when I input
Math.sqrt(9) = @sqrt
it says Task 1 is no longer passing. I feel like this should be so easy, so I'm not sure what to do now.
Thanks!
@pi = nil
@e = nil
@sqrt = nil
Math::E = @e
Math::PI = @PI
Math.sqrt(9) = @sqrt
8 Answers
Lukas Jones
11,667 PointsI would flip your variable assignments so they look like this
@e = Math::E
@PI = Math::PI
@sqrt = Math.sqrt(9)
jonathan kennedy
Courses Plus Student 9,251 PointsIve tried this every which way and it does not work?????
@sqrt = Math.sqrt(9)
Math.sqrt(9) = @sqrt
either was should work?????
Michael Jasinski
7,427 PointsI have @sqrt = Math.sqrt(9) exactly and will not pass. Just a buggy system!
Matthew Delange
26,584 PointsHas anyone passed this Task yet?
I have tried everything and either task one is no longer passing or the @sqrt
variable did not have the correct value.
MICHAEL P
5,191 PointsThis ends up working:
@sqrt = Math.sqrt(9)
Volodymyr Rusynyk
5,725 Pointsstart again from the 1-st task - it will work
niloufarsedarati
Courses Plus Student 17,665 PointsThat's funny ! I have the same problem now and I don't know to how figure out this ,,,
@pi = nil
@e = nil
@sqrt = nil
module Math
Math::E = @e
Math::PI = @PI
Math.sqrt(9) = @sqrt
end
Unsubscribed User
48,988 Points@pi = nil
@e = nil
@sqrt = nil
Math::E = @e
Math::PI = @pi
@sqrt = Math.sqrt(9)