Ad
  • Default User Avatar
  • Custom User Avatar

    You're welcome. I'll give it a shot another time for sure. Have a nice day!

  • Default User Avatar

    too late, the kata is retired.

    Well that's still an experience for you, though. Look at what some users did, look at the way others implement the random tests in other katas you solved (you didn't do it the right way, for now) and try again another time (but with something else: for now, it seems to me a regexp kata is a bit too much complex for you. No offense meant, of course. ;) )

    EDIT: note that your random tests wont generate any wrong input, so it's almost as if they weren't there, for now... ;)

  • Custom User Avatar

    But maybe your right with the regex thing. ;)

  • Custom User Avatar

    I guess my Kata should be more independent and clear by now.

  • Custom User Avatar

    I changed a lot. Please take a look.

  • Default User Avatar

    Note: for a first kata, a regexp one is the worst thing you could choose. If you're not confortable enough with what's underlaying, the random tests will be a real PAIN to you, because users with more knowledge could come up with more general regexp than yours and you could get issues over issues because of that, your soluiton giving wrong answers.

  • Default User Avatar

    no, the problem with this number is rather the number of digits in the middle: according to the other kata (which seems to follow an ISO norm as far as I can remember), this part shouldn't have more than 2 digits, unless it's in first position and then it should be 0dd.

  • Custom User Avatar

    Your absolutely right. This is actually my first Kata and it seems that I still have much to learn. ;)
    There should be an ISO phone number standard I can link to instead of the other Kata.
    But "+49 37322 123456" is actually valid. It consists of (+)country code + area code without 0 + phone number.

  • Default User Avatar
    • not enough fixed tests
    • need random tests.
    • in addition to what I told below, you have the same problem ("what you're asking for is inconsistent with the other kata") with the last part of the number: "1234567" would be invalid in the other.
  • Default User Avatar

    Moreover, since you do not give any informations in the description, one will use the info in the other, and then:

    test.assert_equals(valid_phone_number("+49 37322 123456"), True)
    

    This test is wrong. It should return false according to the other description.

    There is a lot of work to do, here... ;)

  • Default User Avatar

    Hi,

    2 problems, here:

    • You say it yourselve: "inspired by". Maybe too much?
    • the description is missing most of the stuff needed: a kata should be independant of the description of another one (what if the other is deleted?). Currently, one has to do to the other one just to understand what your asking for. That's not good.
  • Custom User Avatar

    I have the same issue like natanaelsirqueira, but I don't know, why I should port my code to legacy python, if it works fine in python3. Could you please provide python3 support for this kata?

  • Custom User Avatar

    You're wrong.
    You're looking for something that isn't there in the test that fails.

  • Custom User Avatar

    I added example tests with empty strings.

  • Loading more items...