Skip to content

Conversation

@imdavis
Copy link
Contributor

@imdavis imdavis commented Oct 13, 2014

Homework for UW Intro to Python

… 20th term correctly. Contains a useful docstring and some assertions for some basic testing.
…erm of the lucas function. Checked that it gives the correct result up to the 20th term of the Lucas fuction. Added some basic assertion tests.
…roth and first terms to give the nth term of the Fibonacci series. Will give nth term of arbitrary series given users specified zeroth and first terms to work from. Some basic assertion tests to show it computes the correct nth term in the series and a docstring giving some details on what the function does.
@PythonCHB
Copy link
Contributor

Thanks for putting in your lightning talk -- MPL is pretty nice!

I do encourage you to take a look at the "OO interface", rather than "from pylab import *" -- the pylab interface is nice for quick interactive use, and is comfortable for Matlab folks, but makes for messy, hard to re-use code when you get bigger projects going...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice use of defined constants and string multiplication

PythonCHB added a commit that referenced this pull request Oct 13, 2014
Ian M. Davis Homework

Love those docstrings!

Very nicely done.

One thing -- it's not really worth catching the AssertionErrors -- they will get hit anyway, so not a lot of value added. But good form for Exceptions in general.
@PythonCHB PythonCHB merged commit 06e2b07 into UWPCE-PythonCert:master Oct 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants