You are viewing a single comment's thread. Return to all comments →
python 3 sol:
class Calculator: def power(self,n,p): if (n >= 0 and p >= 0): return n ** p raise Exception('n and p should be non-negative')
Day 17: More Exceptions
You are viewing a single comment's thread. Return to all comments →
python 3 sol: