Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- # import time
- class MatrizCuadrada:
- """generador de matrices cuadradas de tamaño n.
- almacena por ahora enteros. después veremos con otro tipo de datos"""
- def vector(self, cant):
- return [int(random.random()*100) for i in range(cant)]
- def __init__(self, m):
- col = m
- return [self.vector(m) for i in range(m)]
- def tamano(self):
- return col
- m = MatrizCuadrada(100)
- print m
Add Comment
Please, Sign In to add comment