11/19 help~ thank u~


in the end it shows up

Oops, try again. It looks like your game does not change the O to a capital X for an incorrect guess.

help me ~ thank u


On line 34 you input:
board[ship_row][ship_col] = "X"

but what the task is asking that you print the "X" if it's a miss, and you're trying to call the value that stores the location of the ship, not the guess. Try:

if guess_row == ship_row and guess_col == ship_col:
print "Congratulations! You sank my battleship!"
print "You missed my battleship!"

board[guess_row][guess_col] = "X"

This works for me. Happy programming.


thank u very much!!!


you're very welcome. Happy programming and hope you have fun playing you're battleship game when you're all done. It's a nifty little program to play with a friend if you modify the code a bit