R/exams Presents: Fun with Flags

[This article was first published on R/exams, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Standalone knowledge quiz about the flags of countries and their neighbors, along with the Quarto source files to generate this.

R/exams Presents: Fun with Flags

Knowledge quiz

Standalone file: flags.html

Screenshot of the standalone Fun with Flags quiz page

Resources

flags

  • flags.qmd: Quarto source file embedding the exams2forms() calls, see below.
  • webex.js: Copy of the current Javascript code from the exams2forms package (version 0.2-0).
  • webex.css: Copy of the current style sheets from the exams2forms package (version 0.2-0) with the highlight color changed to the R/exams primary color.
  • cosmo.scss: Style sheets for customizing the cosmo theme to the R/exams primary color and button-style tabsets.
  • fun_with_flags.png: Title image taken from Michael Heap’s Fun with Flags presentation.

Quarto source file

---
title: "![Fun with Flags](fun_with_flags.png){width=330px}"
format:
  html:
    theme:
      - cosmo
      - cosmo.scss
    toc: false
    css: webex.css
    include-after-body: webex.js
    embed-resources: true
---

```{r setup, include = FALSE}
library("exams2forms")
set.seed(0)
```

::: {.panel-tabset}
## Guess the flag

```{r flags, echo = FALSE, message = FALSE, results = "asis"}
exams2forms("flags.Rmd", n = 100)
```

## Find the neighbors

```{r geography, echo = FALSE, message = FALSE, results = "asis"}
geography <- system.file("exercises", "geography.Rmd", package = "exams2forms") |>
  expar(display = "flag")
exams2forms(geography, n = 100)
```

:::
To leave a comment for the author, please follow the link and comment on their blog: R/exams.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)