Date: 06 Dec 2012 12:57
Number of posts: 5
RSS: New posts
If you already thought about it, why not just insert an "assert" statement?… :|
You can assume the numbers are integers. Adding a default returned value for negative
inputs will definitely not be a bad idea (we did this for Fibonacci).
assert may be an overkill, given that we did not mention it yet in class, at least not explicitly.
Of course if you are a seasoned Python programmer, you can use this.
Professor Chor obviously missed a couple of recitations, as we did use assert quite a few times… :-)