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.
This comment is hidden because it contains spoiler information about the solution
There is no "given solution" in the current version of the kata. Reference to it should be removed from the description.
This passes underscores, which are supposed to be disallowed.
I'm getting a syntax error when I submit. 9 tests passed, then:
Traceback: in
in solution
File "/usr/lib/python2.7/re.py", line 151, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "/usr/lib/python2.7/re.py", line 244, in _compile
raise error, v # invalid expression
sre_constants.error: unbalanced parenthesis
This looks like an error in the 10th test case--or possibly even in a module--not in my solution.
The comment markers are specified in the function parameters.
For a framework that many people won't be familiar with, Facebook's documentation is highly technical and skips some basic assumptions. I had to guess several times what syntax it was looking for.
Kudos to them in that my guesses were right every time, so it's reasonably intuitive, but there should really be some complete examples somewhere.
Same deal here. Here's an example:
Capacity: 99
Items: [ [ 154.7, 76.5 ], [ 67.3, 72.2 ], [ 21.2, 151.6 ] ]
[ 0, 0, 4 ] should be the correct answer, [4, 0, 0] is the answer wanted.
Interestingly, my solution initially made the exact same mistake. I was able to pass the kata with a line like this:
if (list of items is one of the examples) re-sort the items into their original order
else leave them sorted by value/size ratio
When this kata gets fixed, I can omit the conditional and it will pass again.
This comment is hidden because it contains spoiler information about the solution
This is essentially the same problem as "Deodorant Evaporator," but 1 kyu harder for some reason.
The description is very confusing. It says "gaz" or "foam" when it means "gas," and the fact that it dispenses a percentage of what's remaining rather than a fixed amount in mL or a percentage of the whole is unintuitive.
It's also strange that the function is passed integers which it converts into doubles. Percentages in computing are usually in terms of x/1 rather than x/100, and the use of doubles makes sense in that context.
To elaborate: In Java, I get "Method PeopleThatPlayBanjo() should not be static". Removing the Static keyword from the test case makes it work.
Treat comments as whitespace for the purpose of determining "similar code variations."
This comment is hidden because it contains spoiler information about the solution
That's weird. I just tried it... and now off to Github to post a fascinating bug report.
I can think of a couple of things that could be cool for clans. One would be a clan leaderboard (sidenote: is there a users leaderboard API? I don't see one documented, but obviously you're doing that calculation. I'd like to see raw scores and total kata completed as well as honor.)
Another would be a clan-specific API call that shows the usernames that belong to that clan, as well as aggregate statistics, and possibly some basic user info (total points, honor, and completions). Would save me having to do manual signups.
This comment is hidden because it contains spoiler information about the solution
Loading more items...