Okay—now for the fun! We have the actual location of the ship and the player’s guess so we can check to see if the player guessed right.
For a guess to be right,
guess_col should be equal to
guess_row should be equal to
if guess_col == 0 and guess_row == 0: print "Top-left corner."
The example above is just a reminder about
On line 29, add an
if to check if
If that is the case, please
"Congratulations! You sank my battleship!"
When you run this code, be sure to enter integer guesses in the panel where it asks for “Guess Row” and then “Guess Col”.