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.
Find repeating patterns in the algorithm, normalize it into some code statements. You do not need to go through all
N
squares and check whether each of them have been visited upon every iteration.this result should be rated higher. simply providing index 0 for pop() is clever.
def IsPrime wrong because 15 is not prime
In the right-hand corner, there are two buttons test and Attempt. The test is for testing your solution with example test cases or test cases you write. Attempt is for attempting premade and random test cases by the author of the kata. If the attempt was successful the attempt button will change to submit thus you can submit.
This is a suggestion. since people have solved already with that name and this is not that crucial I don't won't to make those solutions obsolete.
The perpuse of this kata is to teach something new I learned to other people. and I think this is not an issue becuase of that.
.
I reduced to 200
I am reducing Now
That's a suggestion.
This comment is hidden because it contains spoiler information about the solution
"Sum of the first n ... numbers" is not a novel idea on CW, even if it's not an exact duplicate
Still way too many tests (20000+): about 100 should be enough, unless it's a performance kata (which I think it's not)
Python style guide strongly suggests to use snake case for the function name and variables, so use
sum_of_odd_nums
instead ofSumOfOddNums
I think it needs to be cleared up that the problem with huge number of tests is not that it's not a good way to enforce efficiency but that it literally breaks the site by sending too much test output and locking up the browser.
If you want to do that many tests, don't use one assertion for each test run. Check it manually in a loop and call the appropriate assertion function once per test type.
Loading more items...