8. ...and Seek!


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/python-beginner-en-4XuFm/0/8?curriculum_id=4f89dab3d788890003000096

<In what way does your code behave incorrectly? Include ALL error messages.>
The screen prints, “Guess Row”, but tutorial does not give error message.

<What do you expect to happen instead?>
The code is supposed to create an opportunity to input their guess for both the row and column of the battleship.

```python

from random import randint

board = []

for x in range(0,5):
board.append([“O”] * 5)

def print_board(board):
for row in board:
print " ".join(row)

def random_row(board):
return randint(0, len(board) - 1)

def random_col(board):
return randint(0, len(board[0]) - 1)

ship_row = random_row(board)
ship_col = random_col(board)

Add your code below!

guess_row = int(raw_input("Guess Row: "))
guess_col = int(raw_input("Guess Col: "))

<do not remove the three backticks above>

#2

raw_input is a function which prompts you for input, you will need to actually input something


#3

Thanks. Ha… I feel stupid :stuck_out_tongue:


#4