Vector Times Matrix

Write a function v_times_m(v, m) that receives a vector (in the form of
a tuple) of floats and a matrix of floats m, and returns the product of
the vector by the matrix. The matrix is represented as a tuple of rows,
each row being, in turn, a tuple of floats. We are guaranteed that the
length of v is not zero and that it equals the lengths of all the
columns of m. The returned vector is to be a tuple of the same length as
the rows of m, which is also guaranteed to be nonzero.

Observation

Solutions that return other iterable types instead of tuples are vey
likely to be accepted as well.

Problem information

Author: José Luis Balcázar

Generation: 2026-01-25T16:20:53.536Z

© Jutge.org, 2006–2026.
https://jutge.org
