Ruby: Object Oriented Programming II (Lesson 9: Resolve to Keep Learning)


#1



https://www.codecademy.com/courses/learn-ruby/lessons/object-oriented-programming-ii/exercises/resolve-to-keep-learning?action=lesson_resume


Nothing I have done will work... SCT Error or "uninitialized constant Context::Math::PI". I've tried reloading the page, resetting the exercise, opening the lesson in another web browser... Really frustrated and trying to finish this course up today. I've tried variations on all of these:


I have tried:

puts Math::PI #error: uninitialized constant Context::Math::PI

......

module Math     #error: SCT Error
  def Math
    puts Math::PI
  end
end

......

module Math     #error: SCT Error
  def self
      PI
  end
end


#2

puts Math::PI

Ended up finally working, no idea what the issue was but now it's fine...


#3

module Math

puts Math::PI

end

This code works fine


#4

None of the above examples work for me. I either get SCT Error or unitialized constant Context…


#5

Now it just started working for me aswell. Suddenly puts Math::PI worked just fine.


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.