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.
Description issue:
is improper, should be comparable to:
Almost there!
For the 3rd suggestion, I mean something like the following:
Small test
-->Small random test
Small random test
-->Random test
/Big random test
Thanks for your comments, I fixed it.
The initial solution setup does not compile. Either remove the extra
int
or use proper type hints:Can be:
Should remove the
random
module from the sample test suite.Suggestion: Better to use
Small random test
overSmall test
as the it block message to indicate that the small test is random:Issues
Function name should be in snake_case -->
kid_math
instead ofKidMath
Random test should include negative exponent as well
Suggestion
Consider adding assertion message in the random test for debugging, e.g. using
f"Testing base = {a}, exponent = {b}"
as the third argument of assertion.Description can be made language agnostic
This comment is hidden because it contains spoiler information about the solution
normalni shart bersang ulasanmi
specifically for the reason you just gave: sum of nothing == 0 ;)
But when there is two negative elements close to each other, it is considered as no such sum, why should I return 0??? (last example)
Python translation
Python translation
This line
arr[i] = static_cast(rand() * 1.0 / (static_cast(RAND_MAX) + 1.0) * 21 - 10);
can bestd::uniform_int_distribution⩽int⩾ randomNumber(-9, 10)
. In this case you can rid offctime
header and include the mersenne twister engine with random devicestd::mt19937 mt{ std::random_device{}() }
. The final result would be more convenientarr[i] = randomNumber(mt)
Please remove
using namespace std
from Test Cases/Sample Test CasesI tried but it didn't work before. I don't know why. I fixed it.
Wouldn't it be better to write
ExtraMessage("Wrong answer for arr={" + s_arr + "}"
instead ofstring s_arr("Wrong answer for arr={");
Еhank you for your help and advice.
Loading more items...