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.
Thank you, typos have been addressed.
No, the tests are wrong.
These two expression are matematically equivalent (and both correct), but using floats they may generate slightly different results:
.
Float results should be tested using approximate equality (
test.assert_approx_equal
in python).More on floating point numbers:
Respectfully, I think your solution doesn't work, because it only works on some random test cases.
My solution and many other solutions work for every random test.
Please let me know if I'm wrong.
I'll mark this resolved for now.
Like which ones? I just tested them all and they all worked.
And the people have spoken! I'll take out the starter code and we'll see what people come up with!
Seconding the suggestion to remove the starter code, but if you do keep it, you should avoid the
hash
variable name as it overrides the built-in function of the same name in python.Thanks for the feedback! Glad someone likes it already :)
As for the boilerplate, Id be fine with either, but I think having some standard structure doesnt hurt, since I dont think as written it gives anything away. (Makes reading solutions easier too IMO)
Since the main burden of the kata was figuring out how to manipulate the language operators and the casting properly, I'd go further and say I wouldn't have minded leaving the required hash parameters present.
The external research required (if any) is just an added task for the reader to provide some realism to a minor research focused problem.
I have read test codes of other katas and updated my tests accordingly. Please confirm that there are no other issues.
Thank you!
#help-author
channel of Codewars Discord.I do not understand how the test function works. I tried to follow the example from the
Insert Example
prompt on the website. I can see from the comment here something aboutRandom tests
. How do I implement that or where can I read about implementing that?Unpublishing this kata maybe too late already. You should not have published without random tests in the first place.
If you want to try again with a new version, ask for help in
Discord#help-author
before publishing. People can see and solve theDraft
kata if they have a direct link.Also, read available documentation and test suites of kata you have solved to see how it's done ( not all existing kata will be perfect! ).
Hello, please could you help me as a contributor? I am still very new to authoring and this is my first and only authored kata.
This comment is hidden because it contains spoiler information about the solution
The Snub Cube has a total of 38 faces, with 32 of them being equilateral triangles and 6 squares.if you are calculating surface area the logic is correct but calculations is not.
Loading more items...