Ad
  • Default User Avatar

    Hey, It's my initial value is wrong, my solution was passed,thank you so much, have a good day!

  • Default User Avatar

    Thanks,I go to try it!

  • Custom User Avatar

    Initial value of scores is wrong.
    Test your function with "ba aaa" and see what it returns.
    Don't use max as a var name, it has a special meaning in Python.

  • Default User Avatar

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

  • Custom User Avatar

    Although my comment above focuses on the negative, personally, I think that this is a good kata because it gives a real-world situation for doing the dot product. There are many ways to do a dot product, so it gives us practice thinking about it.

    As it is, some people are challenged not by the underlying problem itself, but by the description of the problem. I like that example, @Chrono79, and think that it could strengthen the description.

    Alternately, you could just write it out in words.

    [0 0 0 0 0 1] means that Good has one Wizard. One Wizard is worth 10, so Good's total army is worth 10. [0 0 0 1 1 1 0] for Evil means that there is 1 Goblin, 1 Uruk Hai and 1 Troll. A Goblin is worth 2, Uruk Hai 3 and a Troll is 5, so Evil's army is worth 10. The result of this battle is a tie!
  • Custom User Avatar

    Each race has a certain worth when battling against others.

    That should cover the common error, but if a test was added in the sample tests it would be fine by me. Or adding this example to the description:

         Good                                       Evil
    
     0 0 0 0 0 1                   /            0 0 0 1 1 1 0
        Wizard                     /       Goblin + Uruk Hai + Troll
          10                       /         2    +  3       +   5
          10                       /               10                           
    

    10 = 10 therefore it is a draw

  • Custom User Avatar

    Maybe it's just "Evil", not bad!

  • Default User Avatar

    a bad kata!!!