
List of IPython Notebooks by Peter Norvig - tu7001
http://norvig.com/ipython/README.html
======
monorailz
In the linked notebook
[http://nbviewer.jupyter.org/url/norvig.com/ipython/Countdown...](http://nbviewer.jupyter.org/url/norvig.com/ipython/Countdown.ipynb)
when he says

>because there are 2 ways to make 27 with the numbers (10, 9, 8), namely,
((10+9)+8) and (10+(9+8))

why not also (10+9+8)?

~~~
dalke
\+ is an associative binary operator. You have to decide which pair to add
first.

~~~
ibrahima
To add on, I think he's writing from a Lisp perspective, not general math
notation.

~~~
moron4hire
That doesn't matter. It's just the basic associative property of addition in
arithmetic. As such, it's present in all programming languages.

~~~
Dylan16807
But in normal math it's easy to use n-ary addition.

~~~
gjm11
In Lisp too -- arguably easier than in most languages. To add 10+9+8 in Lisp
you write (+ 10 9 8), a single 3-ary call to +. In, say, C you write 10+9+8
and the parser turns that into two 2-ary additions.

(Of course, in either language you end up with two 2-operand ADD instructions
in the object code. Nothing has hardware for arbitrary n-ary adds!)

------
glaberficken
As an amateur programmer, I want to call out this particular notebook:

[http://nbviewer.jupyter.org/url/norvig.com/ipython/Cheryl.ip...](http://nbviewer.jupyter.org/url/norvig.com/ipython/Cheryl.ipynb)

Such elegant and readable translation from English to logic to code.

------
projectramo
When something like this happens: when the author of one of my favorite
computer science text books releases an interactive notebook my main sensation
is one of envy.

I really envy all the students who get to study Norvig like this.

Also, you'll probably have access to better health care.

------
monorailz
Absolutely interesting. I'd change the title from "IPython from Peter Norvig"
to "IPython Notebooks by Peter Norvig", though.

