my_df <- dplyr::tibble(x = -100:100, y = x + 5) # solution my_df$cumsum_x <- cumsum(my_df$x) # solution my_sol <- sum(my_df$cumsum_x > -3500)
my_answers <- make_random_answers(my_sol) #check_answers(my_answers)
Crie uma nova coluna em my_df
chamada cumsum_x
, contendo a soma cumulativa de x
(função cumsum
). Desta nova coluna, quantos valores são maiores que -3500?
#exams::answerlist(my_answers, markup = "markdown")
extype: num
exsolution: r my_sol
exname: "dataframe basic 02"
exshuffle: TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.