Ad
  • Custom User Avatar
  • Custom User Avatar

    You can try different approach.

    Now there are 2 different major ways to do it from I saw in solutions.

  • Custom User Avatar
  • Default User Avatar

    @BlindBasics https://docs.codewars.com/community/rules

    "Rules
    Be considerate. Codewars may have "war" in the name but it is actually a respectful and polite community. You will be interacting with users from across the globe, who have different personal opinions and come from different backgrounds and cultures. We are all here for the same thing, to learn and improve. The Codewars community has developers of all skill levels actively participating on the site and in discussions. If you are an experienced programmer, remember that others may not be. We are all learning, we just may be at different stages in that process."

  • Custom User Avatar

    They are.

  • Custom User Avatar

    I think it will make the kata more approachable for students and Python beginners

    Aren't tuples one of the most fundamental basics to learn about in Python??

  • Custom User Avatar

    Errrr.... seriously? :o

    • how using brackets instead of parentheses makes the task easier?
    • how is that better to show/teach bad practices?
  • Default User Avatar

    Personally I think using Python lists is ok for this. I think it will make the kata more approachable for students and Python beginners, which is my intended audiance with this kata.

  • Default User Avatar

    Thanks for these comments. I have followed your suggestions and edited the kata.

  • Default User Avatar

    I've looked at the Codewars documentation, and uploading images is not encouraged. However, I agree that an image would be useful, so I'll work on an ASCII art diagram.

  • Custom User Avatar

    A tuple is fine for this, a class would be really too heavy. Classes are suited when you have custom stuff provided like methods, or when you need mutable properties, not just a fixed number of ordered fields (at most, namedtuples, but it wouldn't bring much value; this structure is very uncommon on Codewars). If users want to use a class, let them do it on their own, but I am sure most wouldn't find any convenvience with it.

  • Custom User Avatar

    The function must return a boolean, there is no reason to test if the value is truthy. Moreover the use of test.expect is discouraged ( https://docs.codewars.com/languages/python/codewars-test )

  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    Why???

  • Custom User Avatar

    This is not an issue, but at most a suggestion. IMO, not a bad idea, but this kata is almost 9 years old, has been solved thousands of times in Python, and doing those changes would invalidate all the submitted solutions. So it won't be done (one may agree with it or not, personnally, I don't really like it much BTW, but that's how it works here).

  • Loading more items...