I'm trying to follow along with the exercises in the "Think Python" book and ran into a problem trying to get turtle to work. Here is the exercise I'm on. (4.1)
The code they want me to execute looks like this:
import turtle
bob = turtle.Turtle()
print(bob)
turtle.mainloop()
bob.fd(100)
bob.lt(90)
bob.fd(100)
But when I execute it, the turtle doesn't move and I get the following error when I close the window:
Traceback (most recent call last):
File "C:\Users\Phil\PycharmProjects\untitled\mypolygon.py", line 6, in <module>
bob.fd(100)
File "C:\Python\3.5\lib\turtle.py", line 1637, in forward
self._go(distance)
File "C:\Python\3.5\lib\turtle.py", line 1605, in _go
self._goto(ende)
File "C:\Python\3.5\lib\turtle.py", line 3158, in _goto
screen._pointlist(self.currentLineItem),
File "C:\Python\3.5\lib\turtle.py", line 755, in _pointlist
cl = self.cv.coords(item)
File "<string>", line 1, in coords
File "C:\Python\3.5\lib\tkinter\__init__.py", line 2308, in coords
self.tk.call((self._w, 'coords') + args))]
_tkinter.TclError: invalid command name ".1395635997272"
I'm not sure what the debugger is saying, and I can't really continue until I figure out where I went wrong. Any help would be greatly appreciated.