1. 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.
  • 2
    $\begingroup$ see the tutorials Defining Functions and Putting Constraints On Patterns $\endgroup$
    – kglr
    Commented Jan 29, 2021 at 0:21
  • $\begingroup$ I have been trying to look at that. New to programming and would like some hints $\endgroup$ Commented Jan 29, 2021 at 0:24
  • $\begingroup$ Is this a homwork assignment? $\endgroup$
    – m_goldberg
    Commented Jan 29, 2021 at 0:29


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.