Ad
  • Custom User Avatar

    Replace your sample tests with this:

    Test.assert_equals(is_pangram("abcdefghijklm"), False)
    Test.assert_equals(is_pangram("nopqrstuvwxyz"), False)
    Test.assert_equals(is_pangram("learn"), False)
    Test.assert_equals(is_pangram("about"), False)
    Test.assert_equals(is_pangram("global"), False)
    Test.assert_equals(is_pangram("scope"), False)
    

    And do what the last 4 test cases are telling you.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I have ran the same code on Komodo edit and its working.

    If it doesn't work here, it doesn't work at all. Your code is wrong.

  • Custom User Avatar

    I think the last two test cases for python are incorrect.. I have ran the same code on Komodo edit and its working.

  • Custom User Avatar

    Hi, is the parameter type kept as Int intentionally(like a catch to the problem), as you are passing double values in your test cases to the function ?

  • Custom User Avatar

    Test 1b failing, I dont understand what's wrong.

  • Custom User Avatar

    Hi @Jarch24. Unfortunately there are many problems with your translation.

    • The solution setup will not compile because the method is not encapsulated by a class.
    • .NET naming conventions are not followed (classes and methods use PascalCase).
    • .NET bracket conventions are not followed (you should be using Allman style for C#, not K&R)
    • Assertion arguments are in the correct order. For Assert.AreEqual, arguments should be (expected, actual), but you have them passed in as (actual, expected).
    • Syntax and indentation style is in general inconsistent and poor.
    • In your testdata generation function you make a new Random which is incorrect since it's seeded by system time. However, it's not an issue because...
    • There's only one random test, however even then...
    • you assert that the user solution's result is equal to that of the user solution's result in your random test...
    • etc...
  • Custom User Avatar

    C# translation, please feel free to provide feedback. Happy Coding

  • Custom User Avatar

    Happened to me too.
    Took me a long time but I ended up realizing my code still wasn't efficient enough and fixed it.

  • Custom User Avatar

    Yep, this Kata sucks. I tried 3 different approaches locally and works fine while here I constantly gets timeouts.

  • Custom User Avatar

    I hadn't notice that you had raised an issue on this. Issues are for problems in the Kata, and your problem is in the code you posted.

    If you need assistance with your code, you could simply ask a question without raising an issue.

  • Custom User Avatar

    The two arrays are not necessarily the same length and that's why you are getting this error. I advise you to research this error; you will learn alot.

  • Custom User Avatar

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

  • Custom User Avatar

    @KenKamau, Sorry , I fixed my code, it works fine. Thank You.

  • Loading more items...