Danger Will Robinson!


#1



else:
print "You missed my battleship!"
board [guess_row][guess_col] = "X"
print_board(board)


This is the right answer for those who are stuck.



#2

Thank you very much. Sorry about the previous posts for some reason they were in the wrong order


#3

board is a multi-dimensional list. lets do a little example:

test = [["x"],["y"],["z"]]

then you could update by using the indexes:

test[0][0] = "X"

now X has become uppercase. In your case you have variables which contain the coordinates guessed by the user, how could you use those to update your multi-dimensional list.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.