Course Test · School: elementary and middle
Grades 3–5: multiplication, fractions and decimals: 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, numtheory. 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.Multi-digit multiplicationAgreesIndependent answer1692RatMath code
R`47 * 36`Output1692
- 2.Long divisionAgreesIndependent answer42RatMath code
R`1008 / 24`Output42
- 3.Division with remainderAgreesDivide 345 by 7. Give the quotient and the remainder.Independent answer49 remainder 2.RatMath code
R`345`.divmod(R`7`)Output[49, 2]
- 4.Equivalent fractionsAgreesFill in the box: .Independent answer15.RatMath code
R`3/4 * 20`Output15
- 5.Comparing fractionsAgreesWhich is larger, or ?Independent answer, because .RatMath code
R`5/8`.greaterThan(R`3/5`)Outputtrue
- 6.Adding unlike fractionsAgrees. Write the answer as a mixed number.Independent answer.RatMath code
R`2/3 + 3/4`.toMixedString()Output1..5/12
RatMath writes the mixed number as1..5/12, its own notation for mixed numbers. - 7.Subtracting mixed numbersAgreesIndependent answerRatMath code
R`3..1/4 - 1..5/6`.toMixedString()Output1..5/12
- 8.Fraction of a numberAgreesWhat is of 15?Independent answer9.RatMath code
R`3/5 * 15`Output9
- 9.Multiplying fractionsAgreesIndependent answerRatMath code
R`2/3 * 4/5`Output8/15
- 10.Dividing by a unit fractionAgreesHow many one-third cups of flour are in 4 cups?Independent answer.RatMath code
R`4 / (1/3)`Output12
- 11.Measurement conversionAgreesA trail is 3.5 km long. How many metres is that?Independent answer3500 m.RatMath code
units.Q("3.5 km").to("m")Output3500 m
- 12.Adding decimalsAgreesIndependent answer16.15RatMath code
R`3.45 + 12.7`.toDecimal()Output16.15
- 13.Multiplying decimalsAgreesIndependent answer0.84RatMath code
R`2.4 * 0.35`.toDecimal()Output0.84
- 14.Dividing decimalsAgreesIndependent answer90 ().RatMath code
R`7.2 / 0.08`Output90
- 15.Decimals as fractionsAgreesWrite 0.375 as a fraction in lowest terms.Independent answer.RatMath code
R`0.375`Output3/8
- 16.Order of operationsAgreesIndependent answer.RatMath code
R`3 + 4 * (6 - 2)^2 / 8`Output11
- 17.Prime or compositeAgreesIs 51 prime or composite?Independent answerComposite: .RatMath code
[numtheory.isPrime(51n), numtheory.factorInteger(51n)]Output[false, [{ prime: 3n, exponent: 1 }, { prime: 17n, exponent: 1 }]] - 18.FactorsAgreesList all the factors of 36.Independent answer1, 2, 3, 4, 6, 9, 12, 18, 36.RatMath code
numtheory.divisors(36n)Output[1n, 2n, 3n, 4n, 6n, 9n, 12n, 18n, 36n]
- 19.Area and perimeterAgreesA rectangular garden is feet by 4 feet. Find its area and its perimeter.Independent answerArea ; perimeter ft.RatMath code
const L = units.Q("7..1/2 ft"), W = units.Q("4 ft"); [L.multiply(W), L.add(W).multiply(R`2`)]Output[30 ft^2, 23 ft]
- 20.VolumeAgreesA box is 5 cm long, 3 cm wide and 4 cm tall. What is its volume?Independent answer.RatMath code
units.Q("5 cm").multiply(units.Q("3 cm")).multiply(units.Q("4 cm"))Output60 cm^3