This is an upgrade to the original. The original used an element of randomness, while this one uses the proper equations (v=d/t, d=t*v, t=d*v). On this one, you can change the ship and bullet speed. I put a small limit of 5 on the ship speed, because almost every time I tested it, if I had the ship speed over 5, it would go off the screen and start moving in a different direction by the time the bullet would have hit it. Press space to have it calculate where to shoot and fire, press A to have it just shoot at where the ship is.
Note: I recently found out how to make this far more accurate. It will now hit with about 99% accuracy. I've actually been testing it for a few minutes, and it's yet to miss.