0

This is a simple shiny_prerendered Rmd file. I want to count the number of correct answers from user interactions. Additionally, I would like to know how to reset the quiz programmatically, which would allow me to start over with all the questions when the code is executed.

---
title: "Hello, Tutorial!"
output: 
  learnr::tutorial
runtime: shiny_prerendered
---

```{r setup, include=FALSE}
library(learnr)
```

```{r letter-b, echo=FALSE}
question(
    "What number is the letter B in the English alphabet?",
    answer("8"),
    answer("14"),
    answer("2", correct = TRUE, ),
    answer("23")
    )
```

```{r letter-a, echo=FALSE}
question(
  "What number is the letter A in the English alphabet?",
  answer("8"),
  answer("14"),
  answer("1", correct = TRUE),
  answer("23")
)
```
Enrique Pérez Herrero
  • 3,699
  • 2
  • 32
  • 33

0 Answers0