set.seed(7) x <- sample (1:3, size = 5, replace = T) y <- sample (1:3, size = 5, replace = T) # solution my_sol <- sum(x*y)
my_answers <- make_random_answers(my_sol) #check_answers(my_answers)
Consider the following vectors x and y:
set.seed(7) x <- sample (1:3, size = 5, replace = T) y <- sample (1:3, size = 5, replace = T)
What is the sum of the elements of a new vector resulting from the multiplication between the elements of x
andy
?
exams::answerlist(my_answers, markup = "markdown")
extype: num
exsolution: r my_sol
exname: "numeric 02"
exshuffle: TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.