13/19 Not again


#1

I don't know what i am doing wrong here :frowning:
can someone please help me

if guess_row == ship_row and guess_col == ship_col:
[Indent] print "Congratulations! You sank my battleship!"
if guess_row not in range(5) or guess_col not in range(5):
[indent] print "Oops, that's not even in the ocean."
elif board[guess_row][guess_col] == "X":
[indent] print "You guessed that one already"
else:
[indent] board[guess_row][guess_col] = "X"
[indent] print "You missed my battleship!"
print_board(board)


#3

"You guessed that one already" following already u must have a full stop


#4

never mind, I solved it :smiley:


#5

i do that with:

  if guess_row == ship_row and guess_col == ship_col:
    print "Congratulations! You sank my battleship MADAFAKE!"
else:
    if guess_row not in range(5) or \
      guess_col not in range(5):
        print "Oops, that's not even in the ocean."
    elif guess_row and guess_col == 'X':
        print "You guessed that one already."
    else:
        print "You missed my battleship!"
        board[guess_row][guess_col] = 'X'
        print_board(board)

#6

Could you please share the solution to this problem?


#7

Maybe the problem of the indentation.You can check it carefully!


#9

ya check the indentation