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.
why the sarcasm?
Even numbers can't disappear out of nowhere. Your code is wrong.
.
sample: tHese guIdElineS aRe deSIgneD tO Be CompAtiBle wItH joe cELKO’s sql prOGraMming StYLe boOk
Expected: true
Actual: false
for sample test case.
Also I am not pretty sure if my code does what I meant.
this was meant to give random number every iteration, and therefore create random case.
But when I recompile my program I see, that in every single compilation those numbers, are exactly the same. Like drawing them happens only one time. Therefore my "random case" is random only for first compilation, and then it looks exactly the same after another compilations. At least it looks like in my OS - Mint, GCC 5.4.0
phh, I guess I have to find another way to generate "random" numbers ;]
Do you have some detail on the test results you're getting? What's failing specifically?
I don't think I might explain it better than dingle: would you consider random to return exactly the same string, all lower- or all upper-case?
They would all be correct results, but that is not how you test the function.
Check this about the code markdown.
This comment is hidden because it contains spoiler information about the solution
I have same problem, the code works fine in my Python IDE but this test makes it impossible to get through. The test answer deletes some of the evens!
after 3 months it is still broken ;<
hint:
Any further term wont increase sum.
Thank you so much for your reply! So there is no reason to reivent the wheel trying to write some code on your own, which have same functionality as this already written and saved as functions in language libraries, right? I gotta trust that if there is built-in function it is most efficient and most safe for all purposes, is that correct?
Hi,
Yes, I think it's a good idea to use functions from a language's "standard library" whenever possible in order to avoid mistakes, performance issues etc. Once you learn them you can also save time and communicate better with other people who are familiar with them.
I believe the code in our solution is more readable, more concise and less error-prone. Notice you can read it almost as an English sentence, compared to low-level "mathematical" language in your solution. It becomes important when you read and maintain a large code base.
In summary, it's a good idea to operate on a high level of abstraction. Think about higher-order functions in functional programming or classes with their public methods in object-oriented programming.
upvote!
This comment is hidden because it contains spoiler information about the solution
Loading more items...