Q35Single correct3 Marks7 Aug 2022
What is the output of the following snippet of code?
```
def do_something(A, x):
m, n = len(A), len(x)
out = []
for i in range(m):
val = 0
for j in range(n):
val += A[i][j] * x[j]
out.append(val)
return out
A = [[1, 0, 1, 1],
[2, 1, 0, 1],
[1, 0, 1, 0],
[0, 1, 2, 1]]
x = [1, 4, 2, 1]
print(do_something(A, x))
```