I really don't know what's wrong here!


Hi everyone, this is the last part of coding for this part. But I cannot get to replace the right position of "O" to "X".

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 PART IS SO FXXKING CONFUSING!

forgive me the French and the indent.

I just do not know why this line of code cannot replace the right place of "O".

The hint:

To specify a single element in a 2-dimensional list, you need to give two indices. The syntax is: list_name[i][j], where i is an element in the outer list and j is an element in the inner list.

I did exactly as the hint is.

Someone help me? Thnaks


board[guess_row][guess_col] = "X" -----should be in else AND x is in capital that is X
if this doesn't work, reply your whole code



I should indeed use a capital "X".