<img height='100%' src='../../images/vector/dynamic.svg' alt='Dynamic Exercises'> Dynamic Exercises
R/exams photo (CC-BY).

Templates with Random Elements

Dynamic Exercises Dynamic Exercises

Randomize exercises dynamically (e.g., using shuffled items, different numbers, text blocks, ...) for a range of question formats (multiple-choice, single-choice, numeric, text, and combinations thereof). The R/exams templates provide a description of the exercises - independent of a particular output format or learning management system - with the text in either Markdown or LaTeX and the randomization in R.

schoice: Single-Choice
  • Task: Select the only correct item out of a list of alternatives.
  • Knowledge quiz: Arbitrary number of shuffled distractors (e.g., swisscapital).
  • Numeric exercises: Distractors are random numbers (from a set/interval) and/or typical arithmetic mistakes (e.g., deriv2, tstat2).
  • Shuffling (or subsampling) can be turned on or off.
mchoice: Multiple-Choice
  • Task: Select all correct items out of a list of alternatives.
  • Knowledge quiz: Arbitrary number of shuffled true or false statements (e.g., capitals, switzerland).
  • Interpretations: Numeric statements that are approximately correct or clearly wrong (e.g., boxplots, scatterplot, ttest).
  • Shuffling (or subsampling) can be turned on or off.
num: Numeric
  • Task: Compute a single numeric value (within a tolerance interval).
  • Numeric exercise: Solving typical arithmetic problems often based on some random numbers (e.g., deriv, tstat).
string: Character String
  • Task: Enter the answer (exactly) as a character string.
  • Knowledge quiz: Sample a word/phrase from a given vocabulary or list of question/answer pairs (e.g., function, countrycodes).
  • Open-ended questions: Longer text answers that can be entered either as an essay (via a text editor) and/or via file upload and which have to be assessed by the examiner rather than automatically (e.g., essayreg).
cloze: Cloze (Combinations of the Above)
  • Task: Solve a set of sub-exercises combining any of the above types.
  • Numeric exercises: Several numeric quantities based on the same problem setting (e.g., confint2, dist2, fourfold, fourfold2).
  • Statistics: Qualitative single- and multiple-choice questions plus numeric exercises based on randomly-generated data (e.g., boxhist, lm, lm2).