Skip to content

Commit 4aa3bb1

Browse files
Tutorials/2dlists: fix width/height swap in image output
closes jdf#129
1 parent d1038f3 commit 4aa3bb1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎Tutorials/2dlists/index.html‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ <h1>Two-Dimensional Lists</h1>
139139
return newList
140140

141141
def drawPoints(pointList):
142-
for i in xrange(len(pointList)):
143-
for j in xrange(len(pointList[0])):
144-
stroke(pointList[i][j])
145-
rect(i,j,10,10)
142+
for y in xrange(len(pointList)):
143+
for x in xrange(len(pointList[0])):
144+
stroke(pointList[y][x])
145+
rect(x,y,10,10)
146146
</pre>
147147
<br>
148148
<p>

0 commit comments

Comments
 (0)