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)

Question

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")

Solution


Meta-information

extype: num exsolution: r my_sol exname: "numeric 02" exshuffle: TRUE



msperlin/afedR documentation built on Sept. 11, 2022, 9:49 a.m.