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.
d*mn, I don't know int can be inherted
How does repr have anything to do with this kata?
You cannot get that behaviour wihout using any classes or objects in python
I challenge you to create a function that is not a class.
Inheriting from int automatically adds a init method that accepts and validates a given numerical input.
Providing a smart solution that resolves the problem and passes the tests isn't cheating in any case. If the author wanted absolutely a function, up to him to check for it.
I consider this cheating since the problem asks for a function, not a class
This comment is hidden because it contains spoiler information about the solution
It is quite frequent (and sometimes natural) to name callable classes as if they were functions.
This comment is hidden because it contains spoiler information about the solution
not required, but that makes the code shorter
explanation plz
thank you
That's mixing functions and classes naming conventions, but well, it's in line with the requested syntax (ugly to me)
This comment is hidden because it contains spoiler information about the solution