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.
Nahhh. Been coding in many languages.
Why use IF EXPRESSION THEN BOOLEAN when all you need is EXPRESSION?
This comment is hidden because it contains spoiler information about the solution
I think you're mis-reading the logs. There are two test cases right after each other, both of them are correct:
I have the same problem, and card was:
A
2
A
9
9
I use pritn to show what is in cards
This comment is hidden because it contains spoiler information about the solution
Well complexity of your code is O(n^2) of both the loops and you are using two list methods too i.e., count and remove which i guess having a complexity of O(n) linear time.. so for better case, you can easily decrease the complexity of your code
Simply, if you can count an
A
as 11 points, and after adding other cards' scores, total score stays at 21 or less, you should do it. Otherwise count it as1
. It's hard to get more specific without revealing too many details =/Click over Blackjack link in the kata description to read the wikipedia article. It's by choice.
The description for this Kata isn't clear. Especially in the case where A can be 1 or 11? How? I tried figuring it out on my own, but I wasn't able to
You'll have to insert something into your code to see the parameters they're using for testing. Maybe print the inputs?
Regarding this test, if 13 is a possible total given the cards available, then you should return 13 and not 23, because the instrauctions say: "Return the highest score of the cards that is less than or equal to 21."
23 should equal 13
is this?? i don't get what are the parameters they are using for testing
Approved
This comment is hidden because it contains spoiler information about the solution
Description cannot be approved, recent changes from related record must be merged first.
Loading more items...