Talk:Pascal's triangle: Difference between revisions

Line 15:
:That's not always easy to do. I think the important part of the task is the generation of each row. We don't need to complicate it with output formatting that isn't important to the theory involved. --[[User:Mwn3d|Mwn3d]] 18:37, 27 December 2009 (UTC)
 
::Need it or not, the Python~2 code as available strays from theory by virtue of the return statement and status as a function rather than a complete program. I submit that completeness and conformity trumps raw theory in the case of code examples and would serve aan broaderadditional segment of the public with formatting applied. I further submit the following additions as alternative and addition to present code under the potential heading of "Traditionally Formatted, Python~3":
::<lang python>def pascal(n):
# Prints out n rows of Pascal's triangle, traditionally formatted.
Anonymous user