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.
i feelt like i am stupid once i saw this code
Idk if is a best- practices case,
it has more readability however.
Please use spoiler flag also in solution comments as your comment is visible on the main page.
This comment is hidden because it contains spoiler information about the solution
Thought as much, but i haven't still gotten the importance of strip
For some unknown reason the source code has been changed for the solution of this kata (the indentation had been changed to tabs and a hex value checking for class C networks had been erroneously changed (making some tests fail).
Again, I have no idea as to why or how this has happened, but I have now fixed the issue.
If anyone knows how to see who changed source code (revision history for a translation), please let me know because I can't seem to find it.
This comment is hidden because it contains spoiler information about the solution
why do people mark this as best practices, it requires going through the entire list (n²+n)/2 times for worse cases.
absolutely, I thought a lot, but didn't understand what it used for
this can simplify, see my solution
You are not considering what can happen if newavg is a float.
No the solution isnt always an integer if newavg is itself not an integer. If that happens(which it most often does in the Test cases) we will always prefer the next higher number. I made this way back in Python 2 but now, in Py 3.8 int isnt necessary.
what is the ceil func for? isnt the solution already an integer?
Ofc you can use range -> BRUH. Just now a range object, so change it to
list(range())
.Loading more items...