Exercise 3.1: Dot Products
Given: two vectors,
x
and
y
, of equal size and range;
Compose: a loop that returns their dot (or inner) product.
for i in 1, size elt_prod := x[i] * y[i] returns value of sum elt_prod end for
Previous Section