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 have the and in there? if a == b, then b better dxmn well == a lmao
Because this solution is at least 5 years old and it wasn't revalidated.
xrange() was removed in Python 3, how this code passed the test?
This is me being pedantic, but xrange is removed in Python 3, not deprecated.
TIL xrange exists. That one's definitely getting some use.
Edit: Or not. Apparently, it's been deprecated in Python 3. Thankfully, range() works for this as well.
I'm not sure who is arguing that yours is less efficient. You have a redundant equality check but that would not amount to much. Superficially, I would guess the rest is the same but in general the Python core developers tend to internally optimize for Pythonic usages so, without testing, it's hard to know whether or not there is any advantage to using the accepted solution (I would guess there's a small advantage). The accepted solution is definitely a lot more Pythonic and more maintainable though.
This comment is hidden because it contains spoiler information about the solution
In Python3 range behaves as xrange did in Python2. https://stackoverflow.com/a/94962/2071807
isnt xrange for python2 ??
I don't even remember writing this but you guys are correct of course. That being said, there are plenty of other kata where honoring Gauss is required.
+1, simple math :P
resolved
I updated the description and test cases, hopefully that fixes the issues.
Add the quotes to the letters in the scores list or add the list to the initial code, so we don't need to spend ime editing this list. Make sure that all the commas are in the list. Otherwise it was a humorous kata!
discription of range is inappropriate. and test case does not fully cover exceptions.