Pascal's triangle (beginner)

Karl M. Syring syring at email.com
Wed Dec 26 17:23:25 CET 2001


"Brandvik" <tmagna at online.no> schrieb im Newsbeitrag
news:2oqj2ucmbo2658uq1dq3v8quc6f116d8tq at 4ax.com...
> I've just started learning Python and I'm wondering how one could
> write a function that would print pascals triangle up to a certain
> number. It would be great if some of you guys could give me some hints
> on how such a script would look. It is not important that the output
> is in the form of a triangle -- I'm just wondering how to calculate
> the values and print them like this:
> 1
> 11
> 121
> 1331
> 14641
> etc...
>
> BTW, this is my first post here...

Look at http://www.inetarena.com/~pdx4d/ocn/python/series.html for the
answer on this and several related questions that my come up.

Karl M. Syring





More information about the Python-list mailing list