Question 13
Consider the following snippet of code and answer the given sub-questions.
def matrix_transform(matrix):
result = []
i = 0
while i < len(matrix):
row = matrix[i]
for element in row:
if element % 2 == 1:
result.append(element * 2)
i += 1
return result
matrix = [[1, 2, 3], [4, 5], [6]]
output = matrix_transform(matrix)
print(output)
What is the value of output after executing the given code snippet?
[2, 6, 10, 14]
[2, 6, 10]
[2, 8, 10]
[2, 6, 14]