Exercise template for a very basic arithmetic task, namely computing the sum of two random numbers minus their difference.
sumdiff
By how much is the sum of the numbers 52 and 30 greater than the difference between these numbers?
The result of the calculation is (52 + 30) – (52 – 30) = 82 – 22 = 60.
By how much is the sum of the numbers 32 and 22 greater than the difference between these numbers?
The result of the calculation is (32 + 22) – (32 – 22) = 54 – 10 = 44.
By how much is the sum of the numbers 42 and 31 greater than the difference between these numbers?
The result of the calculation is (42 + 31) – (42 – 31) = 73 – 11 = 62.
Demo code:
library("exams") set.seed(403) exams2html("sumdiff.Rmd") set.seed(403) exams2pdf("sumdiff.Rmd") set.seed(403) exams2html("sumdiff.Rnw") set.seed(403) exams2pdf("sumdiff.Rnw")