0

```
def matrix(mat, num):
for i in mat:
for j in i:
print(j * num)
```

So I'm trying to make a code that multiplies a matrix by a number, my code above is not working and i think the reason is the for statements could be wrong, so what i tried to do in my code is say for i in mat which should read each row and for j in i, it should read each value in a row. Then it supposed to multiply each value in the row my a num. Any help is appreciated thank you.