Repot a bug


#1


https://www.codecademy.com/es/courses/python-beginner-en-Wal0q/0/7?curriculum_id=50fc7aab5fab3aa9c2002444


import random

tablero = []

for x in range(0,5):
  tablero.append(["O"] * 5)

def print_tablero(tablero):
  for fila in tablero:
    print " ".join(fila)

def fila_aleatoria(tablero):
    return randint(0,len(tablero)-1)
    
def columna_aleatoria(tablero):
    return randint(len(tablero[0]) - 1)


#2

randint() is not imported. look:

import random

print random.randint(0,5)

or:

from random import randint

print randint(0,5)

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.