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.
Yeah learn something new.
Thanks :).
Still a duplicate. Should still be deleted.
What you are doing here is handling any error that your program might raise.
What you are supposed to do is raise an Error if the number isn't an integer.
For example, if you were supposed to raise an error if n was 2, then you would write:
Or you may chose some other class instead of ValueError depending on what kind of Error occured in the program
Here's a list of built in exceptions in Python.
https://docs.python.org/2/library/exceptions.html
In this problem, any of the classes will do. I would recommend using TypeError, since the argument is of the wrong type.
I'm a newbie, could anyone developp what it's meant by raising an error ? I did something like this. How to properly handle the error in this case ?