# dist3: Distances and the Pythagorean Theorem (Single-Choice)

Exercise template for computing the distance (single-choice) between two randomly-drawn points in a Cartesian coordinate system.

Name:
dist3
Related:
Description:
Computing the (Euclidean) distance between two randomly-drawn points by using the Pythagorean Theorem. In addition to the correct solution, four false alternatives are generated through num_to_schoice() by providing two common errors along with a range and minimal delta for two further random solutions.
Solution feedback:
Yes
Randomization:
Random numbers and graphics
Mathematical notation:
Yes
Verbatim R input/output:
No
Images:
Yes
Other supplements:
No
Template:
Raw: (1 random version)

(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("dist3.Rmd", mathjax = TRUE)
set.seed(403)
exams2pdf("dist3.Rmd")

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