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're quite right!
It should be
[a-zA-Z]
instead of\w
.Thanks for spotting the bug,
Don't Panic
;)This comment is hidden because it contains spoiler information about the solution
You might need to consider putting the border situation, i.e. when
n = 5**i
i = 1, 2, ...
, into the testcase as well.Since I've passed the submission test but failed my own test with the error msg:
zeros(25): 5 should equal 6
It could just be like this:
Test.assert_equals(zeros(25), 6, "zeros(25)")
sorry guys, submitted accidentally while testing other's code...XD
Try to use
cgi
to check the content of the givenstr
as @hlfcoding did.e.g.
print cgi.escape(str)
I agree with @Steve Ruble, the description under the 3rd assumption about "ignoring the values within the nested tags" is contradictory to the 3rd, 4th and 5th submission testcases.
Cool. Thank you for making this awesome kata!
testcase for submission might've missed the following situation:
when score of
[x, x, x, y, y, y]
should beThree-of-kind 'x'
+Three-of-kind 'y'
.e.g. score of
[1, 1, 1, 6, 6, 6]
ought to be1000
for Three-of-kind '1' plus600
for Three-of-kind '6' =1000
+600
=1600
cause i've passed it (by clicking the 'submit') when i only counted the score of one of them (Three-of-kind 'x' and Three-of-kind 'y'), while failing my own test
or i might've misunderstood the rules...XD