Skip to content

Commit 9164174

Browse files
authored
Merge pull request jdf#135 from jeremydouglass/jeremydouglass-patch-tutorial2d
Tutorials/2dlists: fix width/height swap in image output
2 parents 7b2fd63 + 4aa3bb1 commit 9164174

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)