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.
Thanks!
I have fixed the missing suits for the example
This is mentioned in the problem description. I have added the fixed tests for this example (there was one actually - that tested full deck of cards in two different orders, but I added some better examples to the flop section.
This kind of situation only appears in the final tests :
In the fifth example , the 4 shouln't be there or should be followed by something.
What does this kata add that other kata's about primes haven't done before?
I enjoyed everything, it was an awesome challenge.
ready
ready
ready
Very confusing description. (Copy paste the markdown)
Task :
Hello, warrior!
In this kata, you need to complete the function
sum_not_prime
, which takes two parameters :max_prime
.max_num
.and must return an
array
of lengthmax_num
where for each index0 <= i <= max_num -1
:Example :
sum_not_prime(10, 15)
The primes that need to be considered :
$2$
,$3$
,$5$
and$7$
.$p=2$
: [0, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2]$p=3$
: [0, 0, 2, 3, 2, 0, 2+3=5, 0, 2, 3, 2, 0, 2+3=5, 0, 2]$p=5$
: [0, 0, 2, 3, 2, 5, 5, 0, 2, 3, 2+5=7, 0, 5, 0, 2]$p=7$
: [0, 0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 0, 5, 0, 2+7=9]Final result :
[0, 0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 0, 5, 0, 9]
Note :
.
@RealKenshiro, I made all the edits as in your example. Looks good?
Edited and Updated. Looks good?
Presentation could be improved : see this and update.
https://www.codewars.com/kumite/6836ea6d4c5a09ff666c1bea/edit
Edit of Initial Solution): Spaces removed. Thank you everyone for pointing out flaws and ways to fix them.
Oh my gosh. Thank you so much. I'll go right in and edit it. Try to keep that code clean.
He's talking about the starter code... the code that the user gets when they open the kata in the trainer for the first time. Here it is, I've replaced the trailing spaces with underscores:
Loading more items...