Pascal's triangle (beginner)

Karl M. Syring syring at
Wed Dec 26 11:23:25 EST 2001

"Brandvik" <tmagna at> schrieb im Newsbeitrag
news:2oqj2ucmbo2658uq1dq3v8quc6f116d8tq at
> 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 for the
answer on this and several related questions that my come up.

Karl M. Syring

More information about the Python-list mailing list