Skip to content

Instantly share code, notes, and snippets.

@nicolasfig
Created October 6, 2012 18:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicolasfig/3845762 to your computer and use it in GitHub Desktop.
Save nicolasfig/3845762 to your computer and use it in GitHub Desktop.
class Matriz:
def __init__(self, columnas, filas):
self.filas= filas
self.columnas= columnas
print("filas: ",filas,"columnas: ",columnas)
def llenarMattriz(self, filas, columnas):
matriz = []
for i in range(filas):
matriz.append([])
for j in range(columnas):
matriz[i].append(int(input("Digite el elemento a adicionar: ")))
matriz= Matriz(3,3);
matriz.llenarMattriz(matriz.columnas,matriz.filas)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment