[Edu-sig] Pascal's Triangle (in 2.6)

2010-01-30 Thread kirby urner
""" Rows of Pascal's Triangle See: http://en.wikipedia.org/wiki/Pascal%27s_triangle "Calculating an individual row" Consider a row starting as follows: 1, 12... Initialize to [1] and multiply by (row_num/1) to get the next term, row[1]. Then decrement and increment again, getting (11 / 2), (10

Re: [Edu-sig] Pascal's Triangle (in 2.6)

2010-01-30 Thread Edward Cherlin
Pascal's Triangle mod 2 is also a Sierpinski gasket fractal. This is one of the Python examples in Pippy in the Sugar education software. # Sierpinski triangles import sys size = 3 modulus = 2 lines = modulus**size vector = [1] for i in range(1,lines+1): vector.insert(0,0) vector.append(0)

Re: [Edu-sig] Pascal's Triangle (in 2.6)

2010-01-30 Thread kirby urner
On Sat, Jan 30, 2010 at 11:21 AM, Edward Cherlin wrote: > Pascal's Triangle mod 2 is also a Sierpinski gasket fractal. This is > one of the Python examples in Pippy in the Sugar education software. > Glad to see OLPC is getting the right stuff here. Your technique of backing everything with a re

Re: [Edu-sig] Math + Python: reviewing some themes (long)

2010-01-30 Thread David MacQuigg
michel paul wrote: Recently I've found Sage invaluable for the purpose of getting computational thinking into the math curriculum. I've spent the last year figuring out how to harness Sage in class, and it is paying off. The difficulty with a pure Python approach has be