11/19 help~ thank u~


#1

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


#2

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!"
else:
print "You missed my battleship!"

board[guess_row][guess_col] = "X"
print_board(board)

This works for me. Happy programming.


#3

thank u very much!!!


#4

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