Here's my "modern" python one-liner for today:

print sum(4./num if i % 2 == 0 else -4./num for i, num in
enumerate(range(1, 100000, 2)))

Cheers,

Matt

On Mon, Mar 14, 2016 at 4:19 PM, kirby urner <kirby.ur...@gmail.com> wrote:

>
> http://nbviewer.jupyter.org/github/4dsolutions/Python5/blob/master/Pi%20Day%20Fun.ipynb
>
> The above URL renders a Github-saved public I-Python Notebook using
> nbviewer, a utility for rendering any Jupyter notebook with a public URL.
>
> My example Python code is generator-centric as successive approximations
> of something, approaching a limit, lends itself to such yield-based
> treatment.
>
> Kirby
>
>
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig@python.org
> https://mail.python.org/mailman/listinfo/edu-sig
>
>
_______________________________________________
Edu-sig mailing list
Edu-sig@python.org
https://mail.python.org/mailman/listinfo/edu-sig

Reply via email to