- Write a function called DOTPRODUCT that has two inputs u and v, assumed to be two non-empty lists of numbers of arbitrary length, checks that the two lists are of equal length, prints an error message and aborts if the two lengths are unequal, and computes the dot product of the two lists if the lengths are equal.
$\begingroup$
$\endgroup$
3
-
2$\begingroup$ see the tutorials Defining Functions and Putting Constraints On Patterns $\endgroup$– kglrJan 29, 2021 at 0:21
-
$\begingroup$ I have been trying to look at that. New to programming and would like some hints $\endgroup$– Kelsie SonnekJan 29, 2021 at 0:24
-
$\begingroup$ Is this a homwork assignment? $\endgroup$– m_goldbergJan 29, 2021 at 0:29
Add a comment
|