## single-choice: What is the third letter of the latin alphabet?
forms_schoice(c("A", "B", "C", "D"), c(FALSE, FALSE, TRUE, FALSE),
obfuscate = FALSE)
## multiple-choice: Which of these numbers are prime?
forms_mchoice(c("1", "2", "3", "4"), c(FALSE, TRUE, TRUE, FALSE),
obfuscate = FALSE)
## string: Which base R function estimates linear regression models?
forms_string("lm", width = 10, obfuscate = FALSE)
## numeric: A population of 1000 grows with a nominal rate of 10% per period.
## How big is the population after three periods?
forms_num(1000 * exp(0.1 * 3), tol = 0.1, width = 10, obfuscate = FALSE)
Run the code above in your browser using DataLab