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.
And the opinion of microsoft: see
https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions
Still broken!
I 'got creative' on this one, but then the following:
Time: 558ms Passed: 300 Failed: 0 Exit Code: 1
NameError: name 'wrap_mystery' is not defined
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
With
p = 10N + 5
, Python's default behaviour is to roundp/10
down for even N, and up for odd N.I suspect the errors are showing up because default rounding is being used in the reference solution, and this only causes an inconsistency with the description in the case of even N.
Two issues:
-As mentioned below, test cases are expecting unrounded numbers for satisfaction of -1
-In the description, numbers ending in 5 are always rounded up, but in the test cases:
Failed when p = 565, r = 0: 56 should equal 55
, meaning that 565 should be rounded down to 56 before subtracting one.This comment is hidden because it contains spoiler information about the solution
Your solution is very quick. Nicely done!
For the Python version, in the description's code example, the attributes are all callable:
bruce_lee.level(); // => 1
bruce_lee.experience(); // => 100
... but the test cases expect them not to be:
Test.assert_equals(bruce_lee.experience, 9100)
And this line is not Python:
var bruce_lee = new Warrior();
Fun kata, but please update the description for Python :)
Or: you can write a solution using recursion, find that it works on regex101.com, then come back here to submit it and realise that in python this kata uses the re module, which does not support recursion -_-
Back to the drawing board...
Came into this with no background knowledge... very instructive once the penny drops!
Fair point, regex is only one way of solving this one. How about adding the
strings
tag in that case?This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
From the description: 'All you need to do is climb over your seat and make your way to the exit'
..Meaning that you end up walking along the row behind you, and not blocking anyone in your own row.
Loading more items...