Why does it ask if I've created the random_row or random_col function?


#1

Question

Why does it ask if I’ve created the random_row or random_col function?

Answer

If you’ve misspelled the name of the randint() function that we use to generate a random number, that will cause this error because Codecademy is testing the return value from your function.
Another common issue is not returning the random value you generate, so be sure to do that!

def random_row(parameter_name):
  # return random value here

FAQ: Learn Python - Battleship - Hide