Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Hey, It's my initial value is wrong, my solution was passed,thank you so much, have a good day!
Thanks,I go to try it!
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.This comment is hidden because it contains spoiler information about the solution
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!
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:
10 = 10 therefore it is a draw
Maybe it's just "Evil", not bad!
a bad kata!!!