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.
Thanks for the clarity! I guess it didn't make sense to me why the test cases were calling an instance variable instead of a method? Got it straightened out now :).
It appears the test cases for Python are broken? The method call after Ball(). is missing the required (). This is causing it to only return an object and not the desired output.
The below is an entirely valid and common solution to such problems, yet it's not an option because of improper test cases.
For example:
class Ball(object):
def init(self, type='regular'):
self.bt = type
def ball_type(self):
return self.bt
I actually haven't had an issue with the ReferenceError. However, I am having an issue passing the 30 numbers test case EVEN THOUGH my output is exactly the same as what is expected by the test case (Python 3.4) which makes no sense to me. Has anyone else run into a similar issue?
I have tried to complete this kata using both Python and Javascript -- both of which appear to be broken. Javascript seems to also have some incorrect test cases.
Perhaps I should indeed!
Why would I ever want my function to return another function instead of just returning the result. Isn't this the gateway to the so called "callback hell"? The approach utilized here doesn't make sense to me at all. IS there a real world use case where this approach is preferential? It just seems like redundant programming to me.
This comment is hidden because it contains spoiler information about the solution
Unless I'm missing something, it appears you're using Python 3 code since Python 2.7 does not have a Statistics module like you've imported in your code. Python 3 does not appear to be available for this kata, at least not for me!