Ad
  • Custom User Avatar

    Just like in Python version, tests in Ruby version reuse the same list for all test cases for some reasons, so don't mutate the input.

  • Custom User Avatar

    I'm having issues with the tests. When I run my code in IRB, I get the correct answer. For example, r = 10, I get Penny. But my tests won't pass. For r = 10 I get "Expected: Penny, instead got: Sheldon". I've tested it on multiple examples that are failing, but shouldn't be. Since I'm getting the correct answer, I can't figure out what I need to do to fix it.