Skip to contents

Group questions into a quiz

Usage

quiz(..., caption = "Quiz")

Arguments

...

One or more question() objects.

caption

Heading shown above the questions.

Value

A learnr2_quiz object, printed as a set of interactive widgets.

Examples

quiz(
  caption = "Arithmetic",
  question(
    "What is 2 + 2?",
    answer("4", correct = TRUE),
    answer("22")
  )
)