Skip to content

24-7 Today

Menu
  • Home
  • Ads Guide
  • Blogging
  • Sec Tips
  • SEO Strategies
Menu

R/exams Presents: Fun with Flags

Posted on May 9, 2025 by 24-7

[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)
```

:::

Related

Related

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

©2025 24-7 Today | Design: WordPress | Design: Facts