Continuing the discussion from FAQ: Learn Python - Battleship - Danger, Will Robinson!:
O O O O O O O O O O O O O O O O O O O O O O O O O 2 3 Guess Row: 2 Traceback (most recent call last): File "python", line 24, in <module> ExecTimeoutException: Program took too long to terminate. 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) print_board(board) def random_row(board): return randint(0, len(board) - 1) def random_col(board): return randint(0, len(board) - 1) ship_row = random_row(board) ship_col = random_col(board) print ship_row print ship_col guess_row = int(raw_input("Guess Row: ")) # line 24 guess_col = int(raw_input("Guess Col: ")) # line 25
I’m continuously getting this error message. I also try out the codecademy solution so the problem isn’t with the code. I can give just one input for the row but not for the column. The next line "Guess Col: " doesn’t get printed on the console.
Would anyone help me to give the input for “guess_col:”