Course Test · School: elementary and middle
Grade 7: proportional reasoning and rational numbers: 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, finance. 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.ProportionsAgrees5 pounds of apples cost \$8.75. At the same rate, what do 8 pounds cost?Independent answer\$1.75 a pound, so \$14.00.RatMath code
R`8.75 / 5 * 8`Output14
- 2.Percent changeAgreesA plant grows from 40 cm to 52 cm. What is the percent increase?Independent answer, a 30% increase.RatMath code
R`(52 - 40)/40 * 100`Output30
- 3.Discount and taxAgreesA \$60 shirt is 25% off, and 8% sales tax is charged on the sale price. What is the total?Independent answerSale price \$45; with tax .RatMath code
R`60 * (1 - 0.25) * 1.08`.toDecimal()Output48.6
- 4.Simple interestAgreesHow much simple interest does \$1200 earn at 3.5% a year for 4 years?Independent answer.RatMath code
finance.simpleInterest(1200, "0.035", 4).interestOutput168
- 5.Adding signed fractionsAgreesIndependent answer.RatMath code
R`-3/4 + 5/6`Output1/12
- 6.Multiplying signed decimalsAgreesIndependent answer.RatMath code
R`(-2.5)*(-4)*(-0.3)`Output-3
- 7.Dividing signed fractionsAgreesIndependent answer.RatMath code
R`(-7/8) / (21/4)`Output-1/6
- 8.Repeating decimalsAgreesWrite as a decimal.Independent answerRatMath code
R`2/11`.toRepeatingDecimal()Output0.#18
RatMath writes the repeating block after#:0.#18is . - 9.Simplifying expressionsAgreesSimplify .Independent answer.RatMath code
symbolic.expand("3(2x - 5) - 4(x - 7)")Output2*x + 13
- 10.Two-step equationAgreesSolve .Independent answer, .RatMath code
symbolic.solve("2.5x - 4 = 11", "x")Outputx = 6
- 11.Equation with parenthesesAgreesSolve .Independent answer, .RatMath code
symbolic.solve("-3(x + 2) = 21", "x")Outputx = -9
- 12.Two-step inequalityAgreesSolve .Independent answer, so (the inequality flips).RatMath code
symbolic.solveInequality("-2x + 5 >= 13", "x")Output(-inf, -4]
- 13.Scale drawingAgreesOn a floor plan 1 inch represents 12 feet. A room is 3.5 inches long on the plan. How long is the room?Independent answerfeet.RatMath code
R`3.5 * 12`Output42
- 14.CirclesAgreesA circle has radius 5 cm. Find its circumference and its area, in terms of .Independent answercm, .RatMath code
[symbolic.simplify("2*pi*5"), symbolic.simplify("pi*5^2")]Output[10*pi, 25*pi]
- 15.Supplementary anglesAgreesTwo supplementary angles measure and . Find and both angles.Independent answer, ; the angles are and .RatMath code
const s = symbolic.solve("(3x + 10) + (2x - 5) = 180", "x"); PRINT(s); const x = R`35`; [x, R`3*${x} + 10`, R`2*${x} - 5`]Output[35, 115, 65]
- 16.Surface areaAgreesFind the surface area of a rectangular prism 4 cm by 5 cm by 6 cm.Independent answer.RatMath code
geo.box(4, 5, 6).surfaceAreaOutput148
boxbuilds the prism as an exact polyhedron with its surface area and volume.Fix: ratmath/geo#11, measurement helpers, 3Dvectorandplane,conicProperties; topology:surface,simplicialComplex, finite spaces - 17.Simple probabilityAgreesA bag has 3 red, 5 blue and 2 green marbles. One is drawn at random. What is the probability that it is not blue?Independent answer.RatMath code
stats.finite({ red: 3, blue: 5, green: 2 }, { normalize: true }).prob((c) => c !== "blue")Output1/2
- 18.Compound eventsAgreesTwo fair dice are rolled. What is the probability that the sum is 8?Independent answer(2,6), (3,5), (4,4), (5,3), (6,2): .RatMath code
stats.dice(2).prob(([a, b]) => a + b === 8)Output5/36
- 19.Repeated trialsAgreesA fair coin is flipped 3 times. What is the probability of exactly two heads?Independent answerHHT, HTH, THH: .RatMath code
stats.binomial(3, R`1/2`).pmf(2)Output3/8
- 20.Predicting from a sampleAgreesIn a random sample of 50 of a school's 1200 students, 18 prefer soccer. Predict how many students in the school prefer soccer.Independent answer; .RatMath code
R`18/50 * 1200`Output432