What you'll want to do is put each of these errors inside its own function. That way you can control better how that code is run. So for this you can say:
```
def cause_name_error():
    x = 5
    print x + y
```
Then later in the code, maybe inside an if name == main, you can call `cause_name_error()` and you'll get that error, and you can just comment out that one line to turn off the error while you run other ones.

Try doing this for all four errors here and let me know when you've got something.