i <- 1:100 x <- ( (-1)^(i+1) )/(2*i - 1) # solution my_sol <- sum(x)
my_answers <- make_random_answers(my_sol) #check_answers(my_answers)
Create a vector x according to the following formula, where $i = 1 ... 100$. What is the sum of the elements of x?
$$ x_i=\frac{-1^{i+1}}{2i-1} $$
exams::answerlist(my_answers, markup = "markdown")
extype: num
exsolution: r my_sol
exname: "numeric "
exshuffle: TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.