Why does the window say "You missed my battleship!" when I guessed correctly?
You didn't guess correctly. You changed the location of the ship after printing out the coords
line 30, you're changing the coordinates. take that part out and it should work.