Ad
  • Default User Avatar

    when I test or do an attempt on Python all of it will fail because it uses user.rank or user.progress while for using attributes it also needs a parentheses like user.rank(). because of that it returns something like <bound method User.rank of <solution.User object at 0x7f81add18a90>>

  • Custom User Avatar
  • Default User Avatar
  • Custom User Avatar

    The basic tests shown at the beginning do not show all the methods you're suppossed to test. The only way to find the page_item_count method is to attempt and have the code failing because you had no input that that method needed modification

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I have passed all the tests except this: '' should equal '\n'
    Without more information, I'm not quite sure why this is going wrong. Would anyone be able to point me in the right direction for how to handle this condition?

  • Default User Avatar

    The kata should explain what to return for edge cases/inputs e.g. empty array, non-integers, duplicate numbers.

  • Default User Avatar

    can someone help me out with my error it shows, index 4, length 4. i don't understand.(Java)

  • Custom User Avatar

    I'm using ruby and when I click on attempt, the 100 random tests can never be fulfilled.

    First, it will return an error saying it was expecting an empty array on a random string.

    The exercise shows that when a string isn't empty, it should split it normally and return an array with the characters.

    If you instead make that so only the example strings pass and every other random string returns an empty array (as it seemed that the attempt required), it shows a completely different scenario, where it expects the code to run normally.

    So you can never have the 100 random attempts to work.

  • Default User Avatar

    Issue with testing.

    tests/Fixture.cs(37,17): warning CS0219: The variable 'Tests' is assigned but its value is never used

    Easy fix in RandomTest()...

    [Test, Description("Random Tests (100 assertions)")]
    public void RandomTest()
    {
      const int Tests = 100;
      
      for (int i = 0; i < 100; ++i)  // Change i<100 to i<Tests
      {
        int r = rnd.Next(-50, 400);
        int g = rnd.Next(-50, 400);
        int b = rnd.Next(-50, 400);
        Console.WriteLine("Testing for {0}, {1}, {2}", r, g, b);
        
        string expected = rgb(r, g, b);
        string actual = Kata.Rgb(r, g, b);
        Assert.AreEqual(expected, actual);
      }
    }
    
  • Default User Avatar

    The page count starts from page 1 and and page index start from 0. I mean you can get it from the example given but it would be nice if its made clearer.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Why if I pass al the test the solution it s not working?

  • Default User Avatar

    Omg. This is the ugliest kata I've ever seen. The C# solution doesn't match the description: the test uses properties to count pages and elements, while the description uses functions. A typo in the class name and these summaries just killed me.

  • Custom User Avatar

    This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/181.
    Please join the discussion to help us identify duplicate kata and retire them.

  • Loading more items...