6 kyu

Float or Integer verifier

371 of 372Good O-man
Description
Loading description...
Regular Expressions
Puzzles
  • Please sign in or sign up to leave a comment.
  • SummerTheCoder Avatar

    Python fork (author is inactive)

    • rewrote the test suite entirely; added random tests
    • used the testing framework properly
  • SummerTheCoder Avatar

    Value is not what was expected tells almost nothing to the person solving the kata. The inputted value, what the user's function returned and what was expected should be given instead.

  • trashy_incel Avatar

    Python:

    • the tests framework is not properly used (missing describe/it)
    • the input is confusingly named arr, even though it is a string
  • user9644768 Avatar

    no random tests. (check my solution) :P

  • G_kuldeep Avatar

    How this is integer -3.2 : expacts True

  • ghostbug Avatar

    Error messages were not that clear when submitting the solution. Argument name why "arr"??? Function name could be something more obvious, not that it was hard to understand but as a good standard.

  • ChristianECooper Avatar

    This comment has been hidden.

  • aggronacho Avatar

    Is there a way to show what numbers fail in the regex pattern? I tested my regex and 74 expression passed but 8 expression failed, I would like to know what numbers didn't pass the regex. I tested the regex and seems to look ok.

  • JS01 Avatar

    This comment has been hidden.

  • Unnamed Avatar

    What about leading and trailing zero which are ignored by try/float()/except solutions?

  • Unnamed Avatar

    There should be a test with only one dot since some regexp solutions consider it a valid float.

  • Katzen_gott Avatar

    I think, it should be mentioned somewhere that there should be no spaces in notation. Otherwise '- 12' should be considered as integer.

  • Good O-man Avatar

    I'm having serious issues with rediting the kata for Ruby language: changes I make don't make it from the editor to the actual kata, are not saved... (looks like CodeWars platform issues to me). Anyway, seeing I can't make changes to the kata for Ruby lang, I just dropped it all together.

    Hope the Python version is not acting funny.

  • moonfly Avatar

    This comment has been hidden.