# Lack of errors and a typo

#1

In Part 14, "Test Run", I realized my code does not return an error for inserting a character into "Guess Row: " or "Guess Column: ".

P.S. There is a typo on one of the errors I got from CC.
"Oops, try again. Your code looks a bit off. Feel free to peek back at earlier exercises if you need help! Your code threw teh following error: invalid literal for int() with base 10: 'j"

#3

Like this? I mean it gives an error but it still does what you want it to i think.
Also you dont need to add something saying you input a letter instead of number but here you go

``````from random import randint

board = []

for x in range(0, 5):
board.append(["~"] * 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[0]) - 1)

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

print ship_row
print ship_col

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

if guess_row.isalpha() or guess_col.isalpha():
print"Use Numbers Next Time"

if(int(guess_row) == ship_row and int(guess_col) == ship_col):
print "Congratulations! You sank my battleship!"

elif(int(guess_row) >= 5 or int(guess_col) >= 5):
print "Oops, that's not even in the ocean."

elif(int(guess_row) and int(guess_col) == "X"):
print "You guessed that one already."

else:
print "You missed my battleship!"
board[guess_row][guess_col] = "X"
print_board(board)``````