CS21 Lab 11: Bug Example 1

Write a separate program that imports the bug class and uses it to draw the following picture.

For this one, you don't have to draw the exact picture. Instead, allow the user to drive the bug, moving it forward, or turning it, and raising and lowering the pen. That way the user can create any picture they want!

Allow the user to control the bug with the following keys:

You can change the keys if you want, but just make sure the user knows how to control the bug.

To get and process key presses in the graphics window, try something like this:

  while True:
    key = gw.checkKey()
    if key != None:
      print(key)
    if key == "Escape":
      break

That should allow you to see what checkKey() returns for any key your press.