fork(3) download
  1. def printmatriz(lista):
  2. for a in lista:
  3. for b in a:
  4. print('{:<5}'.format(b), end=' ')
  5. print()
  6. print('--'*20)
  7.  
  8.  
  9. #Programa principal
  10. a = [[2, 3],
  11. [4, 6]
  12. ]
  13.  
  14. b = [[1, 3, 0],
  15. [2, 1, 1]
  16. ]
  17.  
  18. r = []
  19. rLinhas = len(a)
  20. rColunas = len(b[0])
  21.  
  22. for l in range(rLinhas):
  23. r.append([])
  24. for c in range(rColunas):
  25. val =
  26. r[-1].append(val)
  27.  
  28. print('Matriz normal')
  29. printmatriz(a)
  30. print('Matriz multiplicada por {}'.format(m))
  31. printmatriz(r)
  32.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "/usr/lib/python3.5/py_compile.py", line 125, in compile
    _optimize=optimize)
  File "<frozen importlib._bootstrap_external>", line 735, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "./prog.py", line 25
    val = 
         ^
SyntaxError: invalid syntax

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.5/py_compile.py", line 129, in compile
    raise py_exc
py_compile.PyCompileError:   File "./prog.py", line 25
    val =
         ^
SyntaxError: invalid syntax

stdout
Standard output is empty