set.seed(15)
my_char <- paste(sample(letters, 5000, replace = T), 
                 collapse = '')

# solution
my_sol <- str_count(my_char, 'x')
my_answers <- make_random_answers(my_sol)

#check_answers(my_answers)

Question

Create the following object with the following code:

set.seed(15)
my_char <- paste(sample(letters, 5000, replace = T), 
                 collapse = '')

How many times is the letter 'x' found in the resulting text object?

exams::answerlist(my_answers, markup = "markdown")

Solution


Meta-information

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



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