Better to use .count('r') once and store in a variable.
.count('r')
Ok fine. I'll update the constraints and also re-edit the description.
Read the description carefully. Is 7 even?
7
Happy to help :)
See Goldbach's conjecture says every even number greater than 2 .... 15 is a odd number.
every even number greater than 2 ....
Thanks for letting me know about the test cases and yea I found those duplicates later in kata search.
This comment is hidden because it contains spoiler information about the solution
Only case when generate(length) function returns 1 is when length = 1. Is it asking that to be zero? @gabrielsiedler
generate(length)
1
length = 1
generate(0) should be 0 right? But it says 0 should equal 1
generate(0)
0 should equal 1
Loading collection data...
Better to use
.count('r')
once and store in a variable.Ok fine. I'll update the constraints and also re-edit the description.
Read the description carefully. Is
7
even?Happy to help :)
See Goldbach's conjecture says
every even number greater than 2 ....
15 is a odd number.Thanks for letting me know about the test cases and yea I found those duplicates later in kata search.
This comment is hidden because it contains spoiler information about the solution
Only case when
generate(length)
function returns1
is whenlength = 1
. Is it asking that to be zero? @gabrielsiedlergenerate(0)
should be 0 right? But it says0 should equal 1