Hi, I am stuck on the exercise “Danger, Will Robinson!!”, can some one help me please? I don’t understand the “Make sure to enter a col and row that is on the board!”
Add an else under the if we wrote in the previous step.
Print out “You missed my battleship!”
Set the list element at guess_row, guess_col to “X”.
As the last line in your else statement, call print_board(board) again so you can see the “X”.Make sure to enter a col and row that is on the board!
Make sure to enter a col and row that is on the board!
if guess_row == ship_row and guess_col == ship_col: print "Congratulations! You sank my battleship!" else: print "You missed my battleship!" guess_row = "X" guess_col = "X" print_board(board)