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.
You are mutating the string in-place
learned
This comment is hidden because it contains spoiler information about the solution
Fewer lines of code isn't equal to good/best code though. Readability matters a great deal in large codebases with all sorts of developers coming in-and-out on projects.
Great readability.
Still a duplicate.
The description and test cases have been updated to no longer request an output of "Blackjack!" but instead just request 21, to better match the rules of Blackjack
This was a problem in the random testing that has now been fixed, good catch
Sometimes the random tests give
11
as a value in the hand. But shouldn't it be always be1
if it's an ace?This is a duplicate of: https://www.codewars.com/kata/534ffb35edb1241eda0015fe
Also, a blackjack is when a player gets a 10-value card and an Ace as their starting pair. If a player ends up with 21 any other way, it's not a blackjack.
Not true, you're mutating the input, that's why.
Python basic tests require output as an Integer while the random tests require output as a string. I had to hardcode my solution to match the poor testing.
I got stuck with this problem. I have a very few ideas about functional programming in javascript.
Can you possibly show the solution on codepen or github or wherever you're comfotable with?
Thanks in advance.
There're already katas asking to generate some random output, and they're much better authored than this.
This test is wrong.
Loading more items...