Ad
  • Custom User Avatar
    1. always use the spoiler flag when posting code / solutions (I have added the flag to your comment) otherwise anyone can see it
    2. I suggest you make a habit of reading your error feeback very carefully:
    should return "Odd" for odd positive numbers
    Expected
        <string>: odd
    to equal
        <string>: Odd
    
  • Custom User Avatar

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

  • Custom User Avatar

    Bugged user.

  • Custom User Avatar

    And who says they are? Can you explain what the problem is exactly?

    Your solution causes following error:

    Incorrect answer for number=-21
    Expected: equal to "Odd"
    Actual: "Even"
    

    Your solution incorrectly returns "Even" for n=-21.

  • Custom User Avatar

    Bugged kata, -21 and -977 are not even.

  • Custom User Avatar

    Found it in the below comments

  • Custom User Avatar

    how to do the test any coding. whatever i type it shows error

  • Custom User Avatar

    Maybe mb but I didn't read the solution setup, as it was written awkwardly.
    No intent updating the Details?

  • Custom User Avatar

    Hardest Kata ever (in BF)

  • Custom User Avatar

    very nice problem!

  • Custom User Avatar

    thanks mane u really helped my morale here

  • Custom User Avatar

    Ugh, I thought it would be more difficult. If you are stuck, catch my support!

  • Custom User Avatar

    Returning 0, as per stated in the description, involves 2 conditions:

    • being a valid sequence (numerical values only)
    • having NO missing numbers

    As I said before, an empty sequence is either considered:

    • valid AND missing some numbers (starting with 1) -> so it should return the missing number
      OR
    • not valid (having no numerical values at all) -> so it should return 1

    An empty sequence doesn't satisfy both conditions for returning 0.
    And 1 is the missing number because as stated in the descritpion:
    "Check if the elements are part of an ascending sequence of integers starting with 1".

  • Custom User Avatar

    an empty sequence is valid but missing 1
    In both cases, the return value should be 1, not 0.

    If the sequence is valid, the return value should be 0, not some missing value:

    "1 2 3 4" -> 0  (not 5)
    "1"       -> 0  (not 2)
    ""        -> 0  (not 1)
    
  • Custom User Avatar

    Thanks, I passed!

  • Loading more items...