currency8: Convert Currencies (UTF-8 Encoding)

Exercise template for converting currencies (EUR, USD, GBP) with various symbols in UTF-8 encoding.

Name:
currency8
Type:
Description:
Computing the worth of a randomly drawn number of shares in a certain currency. The main purpose of the exercise is to illustrate and test whether UTF-8 encoding works correctly.
Solution feedback:
Yes
Randomization:
Random numbers and text blocks
Mathematical notation:
Yes
Verbatim R input/output:
No
Images:
No
Other supplements:
No
Raw: (1 random version)
PDF:
currency8-Rmd-pdf
currency8-Rnw-pdf
HTML:
currency8-Rmd-html
currency8-Rnw-html

(Note that the HTML output contains mathematical equations in MathML, rendered by MathJax using ‘mathjax = TRUE’. Instead it is also possible to use ‘converter = “pandoc-mathjax”’ so that LaTeX equations are rendered by MathJax directly.)

Demo code:

library("exams")

set.seed(403)
exams2html("currency8.Rmd", mathjax = TRUE)
set.seed(403)
exams2pdf("currency8.Rmd")

set.seed(403)
exams2html("currency8.Rnw", mathjax = TRUE)
set.seed(403)
exams2pdf("currency8.Rnw")