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.
The best solution I have ever seen.
I attempt 9 tests for 1.7 seconds. Here are they:
test.assert_equals(proper_fractions(1), 0)
test.assert_equals(proper_fractions(2), 1)
test.assert_equals(proper_fractions(40), 16)
test.assert_equals(proper_fractions(13), 12)
test.assert_equals(proper_fractions(25), 20)
test.assert_equals(proper_fractions(15), 8)
test.assert_equals(proper_fractions(1532420), 608256)
test.assert_equals(proper_fractions(500000003), 500000002)
test.assert_equals(proper_fractions(9999999), 6637344)
P.S. Can I know how many tests are there?
This comment is hidden because it contains spoiler information about the solution
Already fixed.
Python:
I can't figure out why this is True:
Test.assert_equals(geo_mean([1, 2], 3), 2.2894284851066637)
The missing number is 6, because (1+2 + X) / 3 = 3;
X = 6
So, the answer is sqrt(6 * 2) ~ 3.464
Any help?
Thanks for comment. I will correct it.
Thank you so much! I have done random tests.
Hello coders.
I would like my kata had some random test cases. But I don't know how to do them. Could you please send me a code for these tests?
Here is the kata:https://www.codewars.com/kata/5919f3bf6589022915000023
Language is Python 3.4