Main.NestedLoops History
Hide minor edits - Show changes to markup
February 10, 2010, at 10:11 AM MST
by -
Added line 3:
Added lines 11-25:
- the range of the inside loop can depend on
- that of the outer loop:
for i in range(10) :
for j in range(i, 10) :
print '*',
print
- a nested loop that prints a multiplication table:
for i in range(1,11) :
for j in range(1,11) :
print i*j,'\t',
February 04, 2010, at 08:46 PM MST
by -
Added lines 1-12:
(:source lang=python:)
"""Nested loops"""
- for and while loops can be nested:
for i in range(4) :
for j in range(3) :
print i,j
print
(:sourceend:)
