-
-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible inaccuracy in 'Defensive Programming' #329
Comments
Yes, you're quite right, a PR clarifying that would be great! I don't recall when we added this exercise, but it strikes me as an odd one... why would we want to constrain the function to only accept monotonically increasing positive numbers? It's also not at all clear what would happen if we ran Perhaps the whole exercise should be replaced with something more straightforward? |
This has been resolved. |
https://swcarpentry.github.io/python-novice-inflammation/08-defensive/
Section: Testing Assertions
The second assertion is actually checking if the last value of the 'result' list is positive on every iteration. On the first iteration it does check that the first value is positive, since result[0] == result[-1], but on subsequent iterations it does not.
The text was updated successfully, but these errors were encountered: