Login and get coding
In this bite you learn to catch/raise exceptions.
Write a simple division function meeting the following requirements:
- when denominator is 0 catch the corresponding exception and return 0.
- when numerator or denominator are not of the right type reraise the corresponding exception.
- if the result of the division (after surviving the exceptions) is negative, raise a
As always see the tests written in
pytestto see what your code need to pass. Have fun!