# fruit2: Image-Based Systems of Linear Equations (Single-Choice)

Exercise template for solving a system of three linear equations (single-choice) with a problem description based on shuffled images.

Name:
fruit2
Description:
A system of three linear equations has to be solved and the solution has to be entered into a fourth equation. However, the system is not defined through a verbal description or mathermatical notation but through images (clip art of tropical fruits). The problem can be interpreted as prices of three fruits (banana, orange, pineapple) and corresponding fruit baskets with different combinations of fruits. Images are stored in Base64 encoding within the exercise files and embedded dynamically into the output. A set of five answer alternatives is generated based on two potential mistakes and two random solutions from a suitable range. PDFs are best generated from the Rnw version, HTML is best generated with pandoc from either the Rmd version (where pandoc is used by default) or the Rnw version (where ttm is used by default, but pandoc can be easily used as well.)
Solution feedback:
Yes
Randomization:
Random numbers, shuffled graphics
Mathematical notation:
Yes
Verbatim R input/output:
No
Images:
Yes
Other supplements:
No
Raw: (1 random version)
PDF:
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("fruit2.Rmd", mathjax = TRUE)
set.seed(403)
exams2pdf("fruit2.Rmd")

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