Ad
  • Custom User Avatar

    Python:for n = 7,
    sequence = [53, 29, 87, 99, 7, 7, 24, 9, (67, 84, 38, 86, 87, 12, 0), =87=, 28, 16, (55, 13, 86, 57, 34, 31, 89), =55=, 85, 75, 52, 93, 96, 44, 59, 56, 5, 32, 17, 22, (79, 30, 84, 52, 64, 53, 94), =30=, 85, 0, 3, 81, 98, 23, 49, 87, 48]
    test says 3 should equal 1
    but we have 3 matches:
    [67, 84, 38, 86, 87, 12, 0] 87
    [55, 13, 86, 57, 34, 31, 89] 55
    [79, 30, 84, 52, 64, 53, 94] 30
    What I am doing wrong ?

  • Custom User Avatar

    I don't think it's ok that some test cases exceed 1MB (while still allowing plenty of incorrect solutions) .. and it's kind of silly that thousands of people use only a couple handfulls of names as well.

  • Custom User Avatar

    Question: Is O a ssoss?

    Issue1: this is not tested (python), specifically that a daughter comes before the seven sons

    Issue2: description is vague on what the result should be

    {
        "name": "A",
        "gender": "male",
        "children": [
            {"name": "BBBB", "gender": "female", "children": []},  # <- a first female child followed by 7 male. allowed?
            {"name": "B", "gender": "male", "children": []},
            {"name": "C", "gender": "male", "children": []},
            {"name": "D", "gender": "male", "children": []},
            {"name": "E", "gender": "male", "children": []},
            {"name": "F", "gender": "male", "children": []},
            {"name": "G", "gender": "male", "children": []},
            {
                "name": "H",
                "gender": "male",
                "children": [
                    {"name": "I", "gender": "male", "children": []},
                    {"name": "J", "gender": "male", "children": []},
                    {"name": "K", "gender": "male", "children": []},
                    {"name": "L", "gender": "male", "children": []},
                    {"name": "M", "gender": "male", "children": []},
                    {"name": "N", "gender": "male", "children": []},
                    {
                        "name": "O",
                        "gender": "male",
                        "children": [],
                    },
                ],
            },
        ],
    }
    
  • Custom User Avatar

    there is still this rather confusing "tip":

    For a seventh son to be a seventh son, there must not be any daughters in the line leading to him. There may be daughters after him, though.

    which I don't think my solution adheres to, I'm on a phone though so I struggle to figure out what's what

    and uh, https://www.codewars.com/kata/reviews/5a15fed357f0af5e19001946/groups/683984554f242c9c07583249 looks to me like it allows 9th child starting with 2 female to count as 7th but I guess that gets to pass? haven't tested it though. and that might be correct but it's not what mine does and that should be tested.

  • Custom User Avatar

    As a new python developer, this solution helped me immensely. Thank you.

  • Custom User Avatar

    It's been so hard for 6kyu =)

  • Custom User Avatar

    Fixed (8 years later :D)

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Great kata to learn dynamic programming, especially to exercise recursion with.

  • Custom User Avatar

    Hi I'm new here and i need someone to guide me in coding

  • Custom User Avatar
  • Custom User Avatar

    wow, it's clever

  • Custom User Avatar

    Python:

    • New test framework should be used

    • Unnecessary logs should be removed and replaced with it blocks

    • test.expect should be revamped

    • Missing corresponding imports

  • Custom User Avatar

    Hi, I passed two of the tree test cases. However, for the test case "DAM", my function says the shift is 8, but it's supposed to be 7. I don't know how to debug this. Why am I off by one, only for this particular test case? Thanks for your help!

  • Loading more items...