Ad
  • Default User Avatar

    Hangman('E', 'everything') ==> 'e_e_______'

    Random tests consistently generate cases where at least two characters are not present. In fact, most of the test cases generate strings composed of underscores ('_') with random lengths.

  • Custom User Avatar

    Problems with typography and Markdown formatting:

    • Use # heading not ###heading###
    • No need to write headings in uppercase and followed by colon
  • Custom User Avatar

    The description should say what to do about corner cases:

    • empty string given as input
    • invalid locomotive position or multiple locomotives e.g. "_A__B"
    • other characters in the input

    I think the description should simply say:

    You can assume that input will only contain valid trains (i.e. one locomotive followed by coaches).

  • Custom User Avatar

    It is not clear from the description that the tests expect the output to be entirely lowercase regardless of the case of the input. I would suggest clarifying this in the description.

  • Custom User Avatar

    The trays are collor coded

    collor -> color

  • Custom User Avatar
  • Custom User Avatar
    Traceback (most recent call last):
      File "tests.py", line 1, in <module>
        from solution import Hangman
    ImportError: cannot import name 'Hangman' from 'solution' (/workspace/default/solution.py)
    
  • Custom User Avatar

    Why is the function called bob ?

  • Default User Avatar

    This series converges to e-1.

    e = \sum_{k=0}^{\inf} 1/k! starting fom 0 (not 1).

  • Default User Avatar

    Main issue:

    Floats have limited precision, and are unable to exactly represent all needed values (only 18 different "e values" can be represented).
    https://docs.codewars.com/authoring/kata/floating-point/
    https://docs.python.org/3/tutorial/floatingpoint.html

    It's better to use Fraction or Decimal.

    Other issues:

    • Floats should be compared with test.assert_approx_equals
    • Floats should be summed with fsum, or at least from smaller to bigger.
  • Custom User Avatar

    purposley should be purposely

    Even though I think that your disclaimer is a bit useless, anyone who wants more test cases can just run the random tests.

  • Custom User Avatar

    Binary is a string made of integers, not a decimal number

  • Custom User Avatar
    1. Having multiple input types is bad. (List[Any] vs List[List[Any]])
    2. It is not mentioned, if items of input of type List[Any] can be always enumerated. Some solutions don't check that.
    3. Random tests only have List[List[int]], which is inconsistent with sample tests

    In general, it would be beneficial to have inputs of one type and to have type definitions in initial solution.
    Though, there is 99% probability that this kata will receive issue trivial filter/map/reduce is not a novel idea :P

  • Custom User Avatar

    There are no example tests in the attempt section

  • Custom User Avatar

    There is only one value in the initial solution

  • Loading more items...