flags: Fun with Flags
R-bloggers 2025-04-30
[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.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Single-choice knowledge quiz question in which the correct flag for a country has to be selected from a list of flags.
Name:
flags
Type:
Related:
Preview:
Which is the flag of Bolivia?





- False.
is the flag of Chile.
- True.
is the flag of Bolivia.
- False.
is the flag of Peru.
- False.
is the flag of Brazil.
- False.
is the flag of Argentina.
Which is the flag of Honduras?





- False.
is the flag of Costa Rica.
- False.
is the flag of Guatemala.
- False.
is the flag of Nicaragua.
- False.
is the flag of El Salvador.
- True.
is the flag of Honduras.
Which is the flag of Ethiopia?





- True.
is the flag of Ethiopia.
- False.
is the flag of Eritrea.
- False.
is the flag of Sudan.
- False.
is the flag of South Sudan.
- False.
is the flag of Djibouti.
Description:
The exercise contains a large list of countries from all continents around the world along with their direct neighbors (sharing a border) and their secondary neighbors (neighbors of neighbors). Flags are generated from the ISO 3166-1 alpha-2 codes, either via their Unicode symbols (especially in HTML-based output) or using the {worldflags} LaTeX package (in PDF output).
Solution feedback:
Yes
Randomization:
Shuffling (1 out of 136 countries)
Mathematical notation:
No
Verbatim R input/output:
No
Images:
No
Other supplements:
No
Demo code:
library("exams")set.seed(403)exams2html("flags.Rmd")set.seed(403)exams2pdf("flags.Rmd", usepackage = "worldflags")set.seed(403)exams2html("flags.Rnw")set.seed(403)exams2pdf("flags.Rnw", usepackage = "worldflags")
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.