Skip to content

Commit e496725

Browse files
author
Jonathan Feinberg
committed
Merge pull request jdf#87 from Prabhnith/patch-1
"Fixed issue: 2 Tutorial bugs" in index.html w.r.t jdf#83 issue
2 parents 354b2f2 + 226187f commit e496725

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Tutorials/objects/index.html‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ <h3>Using an Object</h3>Before we look at the actual writing of a
153153
display()
154154

155155
def move():
156+
global x
156157
x = x + speed
157158
if x &gt; width:
158159
x = 0
@@ -332,7 +333,7 @@ <h3>Writing the Cookie Cutter</h3>The simple Car example above
332333
20, 10)
333334

334335
def drive(self):
335-
self.xpos = self.xspeed
336+
self.xpos += self.xspeed
336337
if self.xpos &gt; width:
337338
self.xpos = 0
338339
</pre>

0 commit comments

Comments
 (0)