Guest User

Untitled

a guest
Jul 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. import random
  2. # import time
  3.  
  4. class MatrizCuadrada:
  5. """generador de matrices cuadradas de tamaño n.
  6. almacena por ahora enteros. después veremos con otro tipo de datos"""
  7.  
  8. def vector(self, cant):
  9. return [int(random.random()*100) for i in range(cant)]
  10.  
  11. def __init__(self, m):
  12. col = m
  13. return [self.vector(m) for i in range(m)]
  14.  
  15. def tamano(self):
  16. return col
  17.  
  18. m = MatrizCuadrada(100)
  19. print m
Add Comment
Please, Sign In to add comment