Course Test · School: elementary and middle
Grade 6: ratios, negative numbers and expressions: RatMath answers
The same twenty exercises, answered with RatMath Core and the Shelf libraries only. The code below was run when this page was built; its output is shown as printed, and compared with the independent answer.
Agrees 20
Libraries used here: core, symbolic, stats, geo. In this code each library is in scope under its own name (linalg.det, stats.tTest), and Core's names (R, Rational, …) are in scope directly.
- 1.RatiosAgreesA class has 12 boys and 18 girls. Write the ratio of boys to girls in simplest form.Independent answer.RatMath code
R`12/18`Output2/3
- 2.Unit rateAgreesSix cans of soup cost \$4.50. What is the price per can?Independent answer.RatMath code
R`4.50 / 6`.toDecimal()Output0.75
- 3.Percent of a numberAgreesWhat is 35% of 80?Independent answer.RatMath code
R`35/100 * 80`Output28
- 4.Finding the wholeAgrees18 is 40% of what number?Independent answer.RatMath code
symbolic.solve("0.4*n = 18", "n")Outputn = 45
- 5.Dividing fractionsAgreesIndependent answer.RatMath code
R`(3/4) / (2/9)`.toMixedString()Output3..3/8
- 6.Dividing decimalsAgreesIndependent answer21 ().RatMath code
R`56.7 / 2.7`Output21
- 7.GCF and LCMAgreesFind the greatest common factor and the least common multiple of 24 and 36.Independent answerGCF 12, LCM 72.RatMath code
[R`24`.gcd(R`36`), R`24`.lcm(R`36`)]Output[12, 72]
- 8.Distributive propertyAgreesFactor out the greatest common factor: .Independent answer.RatMath code
symbolic.factor("6x + 15")Output3*(2*x + 5)
- 9.IntegersAgreesIndependent answer.RatMath code
R`-7 - (-12)`Output5
- 10.Absolute valueAgreesIndependent answer.RatMath code
R`-8`.abs().add(R`3`.abs())Output11
- 11.Coordinate planeAgreesHow far apart are the points and ?Independent answerThey share , so the distance is .RatMath code
geo.distance([-3, 4], [5, 4])Output8
- 12.Evaluating expressionsAgreesEvaluate when and .Independent answer.RatMath code
symbolic.sym("3x^2 - 2y").subs({ x: 4, y: 5 }).simplify()Output38
- 13.One-step equationAgreesSolve .Independent answer.RatMath code
symbolic.solve("x + 7.5 = 12", "x")Outputx = 9/2
Correct; RatMath answers with the fraction where a sixth-grade answer key writes 4.5. - 14.One-step equation with a fractionAgreesSolve .Independent answer.RatMath code
symbolic.solve("3/4*x = 18", "x")Outputx = 24
- 15.ExponentsAgreesIndependent answer.RatMath code
R`2^5 - 3^3`Output5
- 16.Area of a triangleAgreesA triangle has base 9 cm and height 6 cm. What is its area?Independent answer.RatMath code
geo.triangle([0, 0], [9, 0], [2, 6]).areaOutput27
geo measures a triangle from its corners, so the base and height are placed on coordinates first. - 17.Volume with fractional edgesAgreesA rectangular prism measures 2.5 m by 4 m by 3.2 m. Find its volume.Independent answer; .RatMath code
units.Q("2.5 m").multiply(units.Q("4 m")).multiply(units.Q("3.2 m"))Output32 m^3
- 18.Mean, median, modeAgreesFind the mean, median and mode of 4, 8, 6, 5, 8, 10, 8.Independent answerMean ; sorted 4, 5, 6, 8, 8, 8, 10, so median 8; mode 8.RatMath code
const d = [4, 8, 6, 5, 8, 10, 8]; [stats.mean(d), stats.median(d), stats.modes(d)]Output[7, 8, [8]]
- 19.Range and interquartile rangeAgreesFor the data 3, 7, 8, 12, 13, 14, 18, 21, find the range, the quartiles and the interquartile range.Independent answerRange . Lower half 3, 7, 8, 12 has median ; upper half 13, 14, 18, 21 has median . IQR .RatMath code
const d = [3, 7, 8, 12, 13, 14, 18, 21]; [stats.range(d), stats.quartiles(d, { method: "halves" }), stats.iqr(d, { method: "halves" })]Output[18, [15/2, 25/2, 16], 17/2]
School textbooks and the TI-84 take Q1 and Q3 as the medians of the lower and upper halves:method: "halves". The defaultlinearmethod interpolates (as R and NumPy do) and gives , , IQR 7.25.Fix: ratmath/stats#7, textbook quartiles (method: "halves","tukey"); finite distributions accept Core'sInteger - 20.One-step inequalityAgreesSolve and describe the solutions.Independent answer.RatMath code
symbolic.solveInequality("x - 4 > 9", "x")Output(13, inf)