math-exercises 3.0.150 → 3.0.152

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/lib/exercises/exercise.d.ts +5 -0
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/primeNumbersAffirmations.js +1 -1
  4. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts +5 -1
  5. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.d.ts.map +1 -1
  6. package/lib/exercises/math/calcul/fractions/fractionToPercentToDecimal.js +92 -38
  7. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.d.ts.map +1 -1
  8. package/lib/exercises/math/calcul/proportionality/findCoeffInProportionalTableNonIntegers.js +5 -1
  9. package/lib/exercises/math/calcul/proportionality/isTableProportional.d.ts.map +1 -1
  10. package/lib/exercises/math/calcul/proportionality/isTableProportional.js +7 -1
  11. package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.d.ts.map +1 -1
  12. package/lib/exercises/math/calcul/proportionality/isTableProportionalNonInteger.js +5 -1
  13. package/lib/exercises/math/calcul/proportionality/proportionalityTable.d.ts.map +1 -1
  14. package/lib/exercises/math/calcul/proportionality/proportionalityTable.js +5 -1
  15. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.d.ts.map +1 -1
  16. package/lib/exercises/math/calcul/proportionality/proportionalityTableCoefficient.js +8 -2
  17. package/lib/exercises/math/calculLitteral/equation/equa1.d.ts +4 -1
  18. package/lib/exercises/math/calculLitteral/equation/equa1.d.ts.map +1 -1
  19. package/lib/exercises/math/calculLitteral/equation/equa1.js +27 -7
  20. package/lib/exercises/math/calculLitteral/equation/equa2.d.ts +1 -0
  21. package/lib/exercises/math/calculLitteral/equation/equa2.d.ts.map +1 -1
  22. package/lib/exercises/math/calculLitteral/equation/equa2.js +18 -1
  23. package/lib/exercises/math/calculLitteral/equation/equa3.d.ts +4 -1
  24. package/lib/exercises/math/calculLitteral/equation/equa3.d.ts.map +1 -1
  25. package/lib/exercises/math/calculLitteral/equation/equa3.js +26 -6
  26. package/lib/exercises/math/calculLitteral/equation/equa4.d.ts +4 -1
  27. package/lib/exercises/math/calculLitteral/equation/equa4.d.ts.map +1 -1
  28. package/lib/exercises/math/calculLitteral/equation/equa4.js +27 -7
  29. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa1.d.ts +14 -0
  30. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa1.d.ts.map +1 -0
  31. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa1.js +129 -0
  32. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa2.d.ts +18 -0
  33. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa2.d.ts.map +1 -0
  34. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa2.js +167 -0
  35. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa3.d.ts +15 -0
  36. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa3.d.ts.map +1 -0
  37. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa3.js +129 -0
  38. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa4.d.ts +16 -0
  39. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa4.d.ts.map +1 -0
  40. package/lib/exercises/math/calculLitteral/equation/firstDegree/equa4.js +124 -0
  41. package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType1.d.ts +9 -0
  42. package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType1.d.ts.map +1 -0
  43. package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType1.js +107 -0
  44. package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType2.d.ts +10 -0
  45. package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType2.d.ts.map +1 -0
  46. package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType2.js +108 -0
  47. package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType3.d.ts +11 -0
  48. package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType3.d.ts.map +1 -0
  49. package/lib/exercises/math/calculLitteral/equation/firstDegree/firstDegreeEquationIntType3.js +104 -0
  50. package/lib/exercises/math/calculLitteral/equation/firstDegree/index.d.ts +8 -0
  51. package/lib/exercises/math/calculLitteral/equation/firstDegree/index.d.ts.map +1 -0
  52. package/lib/exercises/math/calculLitteral/equation/firstDegree/index.js +7 -0
  53. package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -7
  54. package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
  55. package/lib/exercises/math/calculLitteral/equation/index.js +1 -7
  56. package/lib/exercises/math/dataRepresentations/histogram/etendueHistogram.d.ts +8 -0
  57. package/lib/exercises/math/dataRepresentations/histogram/etendueHistogram.d.ts.map +1 -0
  58. package/lib/exercises/math/dataRepresentations/histogram/etendueHistogram.js +175 -0
  59. package/lib/exercises/math/dataRepresentations/histogram/histogramCommenting.d.ts +9 -0
  60. package/lib/exercises/math/dataRepresentations/histogram/histogramCommenting.d.ts.map +1 -0
  61. package/lib/exercises/math/dataRepresentations/histogram/histogramCommenting.js +250 -0
  62. package/lib/exercises/math/dataRepresentations/histogram/histogramFillDataTableFromHistogramData.d.ts +9 -0
  63. package/lib/exercises/math/dataRepresentations/histogram/histogramFillDataTableFromHistogramData.d.ts.map +1 -0
  64. package/lib/exercises/math/dataRepresentations/histogram/histogramFillDataTableFromHistogramData.js +173 -0
  65. package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.d.ts +14 -0
  66. package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.d.ts.map +1 -0
  67. package/lib/exercises/math/dataRepresentations/histogram/histogramIsSameData.js +239 -0
  68. package/lib/exercises/math/dataRepresentations/histogram/histogramReading.d.ts +9 -0
  69. package/lib/exercises/math/dataRepresentations/histogram/histogramReading.d.ts.map +1 -0
  70. package/lib/exercises/math/dataRepresentations/histogram/histogramReading.js +163 -0
  71. package/lib/exercises/math/dataRepresentations/histogram/index.d.ts +6 -0
  72. package/lib/exercises/math/dataRepresentations/histogram/index.d.ts.map +1 -0
  73. package/lib/exercises/math/dataRepresentations/histogram/index.js +5 -0
  74. package/lib/exercises/math/dataRepresentations/index.d.ts +1 -1
  75. package/lib/exercises/math/dataRepresentations/index.d.ts.map +1 -1
  76. package/lib/exercises/math/dataRepresentations/index.js +1 -1
  77. package/lib/exercises/math/dataRepresentations/tableReading.d.ts.map +1 -1
  78. package/lib/exercises/math/dataRepresentations/tableReading.js +7 -0
  79. package/lib/exercises/math/functions/affines/affineAdjustment.d.ts.map +1 -1
  80. package/lib/exercises/math/functions/affines/affineAdjustment.js +7 -1
  81. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.d.ts.map +1 -1
  82. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +7 -1
  83. package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.d.ts.map +1 -1
  84. package/lib/exercises/math/functions/affines/affineAdjustmentRsquared.js +7 -1
  85. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts +4 -1
  86. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.d.ts.map +1 -1
  87. package/lib/exercises/math/functions/affines/leadingCoeffAndOriginOrdinate.js +19 -4
  88. package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts +1 -0
  89. package/lib/exercises/math/functions/affines/leadingCoefficient.d.ts.map +1 -1
  90. package/lib/exercises/math/functions/affines/leadingCoefficient.js +13 -1
  91. package/lib/exercises/math/functions/affines/recognizeAffineGraph.d.ts +4 -1
  92. package/lib/exercises/math/functions/affines/recognizeAffineGraph.d.ts.map +1 -1
  93. package/lib/exercises/math/functions/affines/recognizeAffineGraph.js +19 -4
  94. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.d.ts.map +1 -1
  95. package/lib/exercises/math/functions/basics/inverseImageFunctionTable.js +7 -1
  96. package/lib/exercises/math/functions/basics/placePointsFromValueTable.d.ts.map +1 -1
  97. package/lib/exercises/math/functions/basics/placePointsFromValueTable.js +7 -0
  98. package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts +4 -1
  99. package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.d.ts.map +1 -1
  100. package/lib/exercises/math/geometry/euclidian/pythagoreOrThales.js +18 -3
  101. package/lib/exercises/math/geometry/triangles/index.d.ts +1 -0
  102. package/lib/exercises/math/geometry/triangles/index.d.ts.map +1 -1
  103. package/lib/exercises/math/geometry/triangles/index.js +1 -0
  104. package/lib/exercises/math/geometry/triangles/similar/index.d.ts +4 -0
  105. package/lib/exercises/math/geometry/triangles/similar/index.d.ts.map +1 -0
  106. package/lib/exercises/math/geometry/triangles/similar/index.js +3 -0
  107. package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.d.ts +10 -0
  108. package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.d.ts.map +1 -0
  109. package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +122 -0
  110. package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWrtSideLengths.d.ts +15 -0
  111. package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWrtSideLengths.d.ts.map +1 -0
  112. package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWrtSideLengths.js +351 -0
  113. package/lib/exercises/math/geometry/triangles/similar/placeSegmentsOfSimilarTriangle.d.ts +11 -0
  114. package/lib/exercises/math/geometry/triangles/similar/placeSegmentsOfSimilarTriangle.d.ts.map +1 -0
  115. package/lib/exercises/math/geometry/triangles/similar/placeSegmentsOfSimilarTriangle.js +311 -0
  116. package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.d.ts +10 -0
  117. package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.d.ts.map +1 -0
  118. package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.js +135 -0
  119. package/lib/exercises/math/probaStat/basicProbas/findEffectifFromProba.d.ts +9 -0
  120. package/lib/exercises/math/probaStat/basicProbas/findEffectifFromProba.d.ts.map +1 -0
  121. package/lib/exercises/math/probaStat/basicProbas/findEffectifFromProba.js +109 -0
  122. package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValue.d.ts.map +1 -1
  123. package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValue.js +7 -0
  124. package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValueMiddleSchool.d.ts +9 -0
  125. package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValueMiddleSchool.d.ts.map +1 -0
  126. package/lib/exercises/math/probaStat/basicProbas/getMissingProbabilityValueMiddleSchool.js +120 -0
  127. package/lib/exercises/math/probaStat/basicProbas/index.d.ts +4 -0
  128. package/lib/exercises/math/probaStat/basicProbas/index.d.ts.map +1 -1
  129. package/lib/exercises/math/probaStat/basicProbas/index.js +4 -0
  130. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.d.ts +12 -0
  131. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.d.ts.map +1 -0
  132. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.js +374 -0
  133. package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
  134. package/lib/exercises/math/probaStat/probaFromTableNoContext.js +7 -0
  135. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  136. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +7 -0
  137. package/lib/exercises/math/probaStat/stats1var/averageWithTable.d.ts.map +1 -1
  138. package/lib/exercises/math/probaStat/stats1var/averageWithTable.js +7 -1
  139. package/lib/exercises/math/probaStat/stats1var/calculateMeanFromFrequencies.d.ts.map +1 -1
  140. package/lib/exercises/math/probaStat/stats1var/calculateMeanFromFrequencies.js +7 -0
  141. package/lib/exercises/math/probaStat/stats1var/cumulativeSum.d.ts.map +1 -1
  142. package/lib/exercises/math/probaStat/stats1var/cumulativeSum.js +7 -0
  143. package/lib/exercises/math/probaStat/stats1var/etendueTable.d.ts.map +1 -1
  144. package/lib/exercises/math/probaStat/stats1var/etendueTable.js +7 -1
  145. package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.d.ts.map +1 -1
  146. package/lib/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.js +7 -0
  147. package/lib/exercises/math/probaStat/stats1var/interquartilesTable.d.ts.map +1 -1
  148. package/lib/exercises/math/probaStat/stats1var/interquartilesTable.js +5 -1
  149. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.d.ts.map +1 -1
  150. package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +7 -0
  151. package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts +2 -0
  152. package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts.map +1 -1
  153. package/lib/exercises/math/probaStat/stats1var/medianWithList.js +67 -14
  154. package/lib/exercises/math/probaStat/stats1var/medianWithTable.d.ts.map +1 -1
  155. package/lib/exercises/math/probaStat/stats1var/medianWithTable.js +7 -1
  156. package/lib/exercises/math/probaStat/stats1var/quartiles.d.ts.map +1 -1
  157. package/lib/exercises/math/probaStat/stats1var/quartiles.js +7 -1
  158. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.d.ts.map +1 -1
  159. package/lib/exercises/math/probaStat/stats1var/standardDeviationTable.js +5 -1
  160. package/lib/exercises/math/probaStat/stats1var/varianceTable.d.ts.map +1 -1
  161. package/lib/exercises/math/probaStat/stats1var/varianceTable.js +5 -1
  162. package/lib/exercises/math/probaStat/stats2var/averagePoint.d.ts.map +1 -1
  163. package/lib/exercises/math/probaStat/stats2var/averagePoint.js +7 -1
  164. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts +7 -0
  165. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -0
  166. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +171 -0
  167. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.d.ts +7 -0
  168. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.d.ts.map +1 -0
  169. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.js +155 -0
  170. package/lib/exercises/math/probaStat/twoStepExperiments/index.d.ts +3 -0
  171. package/lib/exercises/math/probaStat/twoStepExperiments/index.d.ts.map +1 -1
  172. package/lib/exercises/math/probaStat/twoStepExperiments/index.js +3 -0
  173. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.d.ts +7 -0
  174. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.d.ts.map +1 -0
  175. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.js +189 -0
  176. package/lib/exercises/math/spaceGeometry/index.d.ts +1 -0
  177. package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
  178. package/lib/exercises/math/spaceGeometry/index.js +1 -0
  179. package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.d.ts +14 -0
  180. package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.d.ts.map +1 -0
  181. package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.js +439 -0
  182. package/lib/exercises/math/spaceGeometry/sections/areaOfCylinderSection.d.ts +14 -0
  183. package/lib/exercises/math/spaceGeometry/sections/areaOfCylinderSection.d.ts.map +1 -0
  184. package/lib/exercises/math/spaceGeometry/sections/areaOfCylinderSection.js +548 -0
  185. package/lib/exercises/math/spaceGeometry/sections/areaOfRectangularPrismSection.d.ts +11 -0
  186. package/lib/exercises/math/spaceGeometry/sections/areaOfRectangularPrismSection.d.ts.map +1 -0
  187. package/lib/exercises/math/spaceGeometry/sections/areaOfRectangularPrismSection.js +360 -0
  188. package/lib/exercises/math/spaceGeometry/sections/areaOfSphereSection.d.ts +9 -0
  189. package/lib/exercises/math/spaceGeometry/sections/areaOfSphereSection.d.ts.map +1 -0
  190. package/lib/exercises/math/spaceGeometry/sections/areaOfSphereSection.js +272 -0
  191. package/lib/exercises/math/spaceGeometry/sections/index.d.ts +9 -0
  192. package/lib/exercises/math/spaceGeometry/sections/index.d.ts.map +1 -0
  193. package/lib/exercises/math/spaceGeometry/sections/index.js +8 -0
  194. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.d.ts +11 -0
  195. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.d.ts.map +1 -0
  196. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.js +266 -0
  197. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.d.ts +11 -0
  198. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.d.ts.map +1 -0
  199. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfCylinder.js +236 -0
  200. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.d.ts +7 -0
  201. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.d.ts.map +1 -0
  202. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfRectangularPrism.js +92 -0
  203. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.d.ts +9 -0
  204. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.d.ts.map +1 -0
  205. package/lib/exercises/math/spaceGeometry/sections/recognizeSectionsOfSphereOrBall.js +236 -0
  206. package/lib/exercises/pc/mathExosInPC.d.ts +4 -4
  207. package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
  208. package/lib/exercises/pc/mathExosInPC.js +4 -4
  209. package/lib/index.d.ts +173 -45
  210. package/lib/index.d.ts.map +1 -1
  211. package/lib/math/geometry/spacePoint.d.ts +10 -0
  212. package/lib/math/geometry/spacePoint.d.ts.map +1 -1
  213. package/lib/math/geometry/spacePoint.js +13 -0
  214. package/lib/tree/nodes/operators/substractNode.d.ts +1 -0
  215. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  216. package/lib/tree/nodes/operators/substractNode.js +6 -0
  217. package/package.json +1 -1
@@ -0,0 +1,374 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { blueMain, colorWithOpacity, greenLight, orange, red, } from "../../../../geogebra/colors.js";
4
+ import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
5
+ import { Point } from "../../../../math/geometry/point.js";
6
+ import { Vector } from "../../../../math/geometry/vector.js";
7
+ import { randint } from "../../../../math/utils/random/randint.js";
8
+ import { round } from "../../../../math/utils/round.js";
9
+ import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
10
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
11
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
12
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
13
+ import { random, randomMany } from "../../../../utils/alea/random.js";
14
+ import { shuffle } from "../../../../utils/alea/shuffle.js";
15
+ import { mdTable } from "../../../../utils/markdown/mdTable.js";
16
+ const colors = [red, blueMain, greenLight, orange];
17
+ const colorNames = ["rouge", "bleu", "vert", "orange"];
18
+ const createVector = (from, to, name, precision = 5) => {
19
+ return new Vector(name, round(substract(to.x, from.x).evaluate(), precision).toTree(), round(substract(to.y, from.y).evaluate(), precision).toTree());
20
+ };
21
+ const createPoint = (x, y, name, precision = 5) => {
22
+ return new Point(name, round(x, precision), round(y, precision));
23
+ };
24
+ const rotatePoint = (target, angle, center, name, precision = 2) => {
25
+ const vSrc = createVector(center, target, "vSrc", precision);
26
+ const vRotated = vSrc.rotate(angle, "vRotated");
27
+ return createPoint(add(center.x, vRotated.x).evaluate(), add(center.y, vRotated.y).evaluate(), name, precision);
28
+ };
29
+ const createPointWithWeights = (arrPointAndWeight) => {
30
+ return arrPointAndWeight.reduce((acc, [p, w]) => {
31
+ return new Point("acc", acc.x.evaluate() + w * p.x.evaluate(), acc.y.evaluate() + w * p.y.evaluate());
32
+ }, new Point("O", 0, 0));
33
+ };
34
+ const probaWheelGGBCommands = (arrItem) => {
35
+ const radius = 12;
36
+ const point0 = new Point("O", 0, 0);
37
+ function createWheelItemGGBCommands(wheelItem, i, angleInDegreesSector) {
38
+ const angleInRadiansSector = (angleInDegreesSector * PiNode.evaluate()) / 180.0;
39
+ const point1Raw = new Point("P1", radius, 0);
40
+ const point2Raw = new Point("P2", radius * Math.cos(angleInRadiansSector), radius * Math.sin(angleInRadiansSector));
41
+ const angleInRadiansRotate = (2 * PiNode.evaluate() * (1.0 * i + 0.5)) / arrItem.length + //center wrt sector
42
+ (PiNode.evaluate() * 3.0) / 2.0; //put first sector on top
43
+ const [point1, point2] = [point1Raw, point2Raw].map((pointRaw) => {
44
+ return rotatePoint(pointRaw, -angleInRadiansRotate, point0, "rotated", 3);
45
+ });
46
+ const pointForLabel = createPointWithWeights([
47
+ [point0, 0.24],
48
+ [point1, 0.38],
49
+ [point2, 0.38],
50
+ ]);
51
+ return [
52
+ //circular sector
53
+ `C_${i} = CircularSector(${point0.toMathString()}, ${point1.toMathString()}, ${point2.toMathString()})`,
54
+ `SetFixed(C_${i}, true, false)`,
55
+ `SetColor(C_${i}, "${colorWithOpacity(colors[wheelItem.indexColor], 80)}")`,
56
+ `SetLineThickness(C_${i}, 1)`,
57
+ //border
58
+ `Cb_${i} = CircularSector(${point0.toMathString()}, ${point1.toMathString()}, ${point2.toMathString()})`,
59
+ `SetFixed(Cb_${i}, true, false)`,
60
+ `SetColor(Cb_${i}, "#FF000000")`,
61
+ `SetLineThickness(Cb_${i}, 1)`,
62
+ //label
63
+ `L_${i} = Text("$\\large \\text{${wheelItem.value}}$", ${pointForLabel.toMathString()}, false, true, 0, 0)`,
64
+ `SetFixed(L_${i}, true, false)`,
65
+ ];
66
+ }
67
+ return [
68
+ ...arrItem.flatMap((wheelItem, i) => {
69
+ const angleInDegreesSector = 360.0 * (1.0 / arrItem.length);
70
+ const itemCommands = createWheelItemGGBCommands(wheelItem, i, angleInDegreesSector);
71
+ return [...itemCommands];
72
+ }),
73
+ //circle border
74
+ `C = Circle(${point0.toMathString()}, ${radius * 1.05})`,
75
+ `SetFixed(C, true, false)`,
76
+ //triangle
77
+ ...(() => {
78
+ const pointTL = new Point("TL", -0.03 * radius, radius + 0.03 * radius);
79
+ const pointTR = new Point("TR", +0.03 * radius, radius + 0.03 * radius);
80
+ const pointB = new Point("TB", 0, radius - 0.03 * radius);
81
+ return [
82
+ `T = Polygon(${pointTL.toMathString()},${pointTR.toMathString()},${pointB.toMathString()})`,
83
+ `SetFilling(T, 1)`,
84
+ `SetColor(T, "#FF000000")`,
85
+ `SetFixed(T, true, false)`,
86
+ ];
87
+ })(),
88
+ ];
89
+ };
90
+ const getDictEventsAndProba = (arrItem) => {
91
+ const outDict = {};
92
+ const indexesColorsUsed = [
93
+ ...new Set(arrItem.map((wheelItem) => wheelItem.indexColor)),
94
+ ];
95
+ //couleur
96
+ {
97
+ const dictColor = indexesColorsUsed.reduce((acc, i) => {
98
+ const nbIssues = arrItem.filter((itemX) => itemX.indexColor === i).length;
99
+ const nodeProba = frac(nbIssues, arrItem.length);
100
+ acc[i] = nodeProba;
101
+ return acc;
102
+ }, {});
103
+ outDict["couleur"] = dictColor;
104
+ }
105
+ const valuesUsed = [...new Set(arrItem.map((wheelItem) => wheelItem.value))];
106
+ //numéro
107
+ {
108
+ const dictValue = valuesUsed.reduce((acc, i) => {
109
+ const nbIssues = arrItem.filter((itemX) => itemX.value === i).length;
110
+ const nodeProba = frac(nbIssues, arrItem.length);
111
+ acc[i] = nodeProba;
112
+ return acc;
113
+ }, {});
114
+ outDict["numéro"] = dictValue;
115
+ }
116
+ //parité
117
+ {
118
+ const dictColor = [0, 1].reduce((acc, i) => {
119
+ const nbIssues = arrItem.filter((itemX) => itemX.value % 2 === i).length;
120
+ const nodeProba = frac(nbIssues, arrItem.length);
121
+ acc[i] = nodeProba;
122
+ return acc;
123
+ }, {});
124
+ outDict["parité"] = dictColor;
125
+ }
126
+ return outDict;
127
+ };
128
+ const getStrEvent = (typeAsked, indexEvent) => {
129
+ switch (typeAsked) {
130
+ case "couleur":
131
+ return `Le secteur obtenu est ${colorNames[indexEvent]}`;
132
+ case "numéro":
133
+ return `Le secteur obtenu a pour numéro $${indexEvent.frenchify()}$`;
134
+ case "parité":
135
+ return `Le secteur obtenu a un numéro ${indexEvent === 0 ? "pair" : "impair"}`;
136
+ default:
137
+ throw new Error("Unsupported typeAsked: " + typeAsked);
138
+ }
139
+ };
140
+ const getIndexEvent = (wheelItem, typeAsked) => {
141
+ switch (typeAsked) {
142
+ case "couleur":
143
+ return wheelItem.indexColor;
144
+ case "numéro":
145
+ return wheelItem.value;
146
+ case "parité":
147
+ return wheelItem.value % 2;
148
+ default:
149
+ throw new Error("Unsupported typeAsked: " + typeAsked);
150
+ }
151
+ };
152
+ const getValidInvalidPools = (identifiers) => {
153
+ const { arrItem, typeAsked } = identifiers;
154
+ const dictEventsAndProba = getDictEventsAndProba(arrItem);
155
+ const wheelItemAsked = arrItem[0];
156
+ const indexAsked = getIndexEvent(wheelItemAsked, typeAsked);
157
+ const nodeProbaAsked = dictEventsAndProba[typeAsked][indexAsked].simplify();
158
+ const arrOtherEventAndProba = Object.entries(dictEventsAndProba).reduce((acc, [typeEvent, dictProba]) => {
159
+ acc.push(...Object.entries(dictProba).flatMap(([s, nodeProba]) => {
160
+ const indexEvent = +s;
161
+ if (typeEvent === typeAsked && indexEvent === indexAsked) {
162
+ return [];
163
+ }
164
+ else {
165
+ return [{ typeEvent, indexEvent, nodeProba }];
166
+ }
167
+ }));
168
+ return acc;
169
+ }, []);
170
+ const [validPool, invalidPool] = arrOtherEventAndProba.reduce((acc, miniDict) => {
171
+ const isSameAsProbaAsked = substract(miniDict.nodeProba.simplify(), nodeProbaAsked)
172
+ .simplify()
173
+ .evaluate() === 0;
174
+ acc[isSameAsProbaAsked ? 0 : 1].push(miniDict);
175
+ return acc;
176
+ }, [[], []]);
177
+ return [validPool, invalidPool];
178
+ };
179
+ const getInstruction = (identifiers) => {
180
+ const { arrItem, typeAsked } = identifiers;
181
+ const wheelItemAsked = arrItem[0];
182
+ return `On fait tourner la roue ci-dessous, dont les $${arrItem.length}$ secteurs ont la même aire.
183
+
184
+ On réalise l'événement "${getStrEvent(typeAsked, getIndexEvent(wheelItemAsked, typeAsked))}".
185
+
186
+ Parmi les évènements proposés, lesquels sont équiprobables à l'évènement réalisé ?`;
187
+ };
188
+ const getGGBOptions = (identifiers) => {
189
+ const { arrItem } = identifiers;
190
+ const ggb = new GeogebraConstructor({
191
+ commands: [...probaWheelGGBCommands(arrItem)],
192
+ hideAxes: true,
193
+ hideGrid: true,
194
+ forbidShiftDragZoom: true,
195
+ });
196
+ return ggb.getOptions({
197
+ coords: [-15, 15, -15, 15],
198
+ });
199
+ };
200
+ const getHint = () => {
201
+ return `Compte le nombre d'issues réalisent chaque évènement et cherche lesquels sont égaux entre eux.`;
202
+ };
203
+ const getCorrection = (identifiers) => {
204
+ const { arrItem, typeAsked } = identifiers;
205
+ const wheelItemAsked = arrItem[0];
206
+ const dictEventsAndProba = getDictEventsAndProba(arrItem);
207
+ const indexAsked = getIndexEvent(wheelItemAsked, typeAsked);
208
+ const nodeProbaAsked = dictEventsAndProba[typeAsked][indexAsked];
209
+ const [validPool] = getValidInvalidPools(identifiers);
210
+ return `Pour cette roue de $${arrItem.length}$ secteurs, voici quelques événèments réalisables avec leur probabilité :
211
+
212
+ ${mdTable([
213
+ ["Évènement", "Probabilité"],
214
+ ["", ""],
215
+ ...Object.entries(dictEventsAndProba["couleur"]).map(([s, nodeProba]) => {
216
+ const indexEvent = +s;
217
+ return [getStrEvent("couleur", indexEvent), `$${nodeProba.toTex()}$`];
218
+ }),
219
+ ["", ""],
220
+ ...Object.entries(dictEventsAndProba["numéro"]).map(([s, nodeProba]) => {
221
+ const indexEvent = +s;
222
+ return [getStrEvent("numéro", indexEvent), `$${nodeProba.toTex()}$`];
223
+ }),
224
+ ["", ""],
225
+ ...Object.entries(dictEventsAndProba["parité"]).map(([s, nodeProba]) => {
226
+ const indexEvent = +s;
227
+ return [getStrEvent("parité", indexEvent), `$${nodeProba.toTex()}$`];
228
+ }),
229
+ ["", ""],
230
+ ])}
231
+
232
+ L'évènement "${getStrEvent(typeAsked, getIndexEvent(wheelItemAsked, typeAsked))}" a pour probabilité $${nodeProbaAsked.toTex()}$.
233
+
234
+ Voici les autres évènements du tableau ayant pour probabilité $${nodeProbaAsked.toTex()}$ :
235
+
236
+ ${validPool
237
+ .map(({ typeEvent, indexEvent }) => {
238
+ return getStrEvent(typeEvent, indexEvent);
239
+ })
240
+ .map((str) => `- ${str}`).join(`
241
+ `)}
242
+
243
+ `;
244
+ };
245
+ const getPropositions = (n, { answer, ...identifiers }) => {
246
+ const propositions = [];
247
+ const [validPool, invalidPool] = getValidInvalidPools(identifiers);
248
+ const nbValid = randint(1, validPool.length);
249
+ shuffle(validPool)
250
+ .slice(0, nbValid)
251
+ .forEach((miniDict) => {
252
+ const strEvent = getStrEvent(miniDict.typeEvent, miniDict.indexEvent);
253
+ addValidProp(propositions, strEvent, "raw");
254
+ });
255
+ const nbInvalid = n - nbValid;
256
+ shuffle(invalidPool)
257
+ .slice(0, nbInvalid)
258
+ .forEach((miniDict) => {
259
+ const strEvent = getStrEvent(miniDict.typeEvent, miniDict.indexEvent);
260
+ tryToAddWrongProp(propositions, strEvent, "raw");
261
+ });
262
+ return shuffleProps(propositions, n);
263
+ };
264
+ const getPickEquiprobableToQuestion = () => {
265
+ const typeAsked = random(["couleur", "numéro", "parité"]);
266
+ const nbWheelItems = randint(5, 11);
267
+ function createRandomArrItem(nbWheelItems) {
268
+ function* genFuncWheelItemValue() {
269
+ const nbDifferent = randint(3, nbWheelItems);
270
+ const arrValue = randomMany([...Array(10).keys()], nbDifferent);
271
+ yield* shuffle([...arrValue]);
272
+ while (true) {
273
+ yield random(arrValue);
274
+ }
275
+ }
276
+ const generateWheelItemValue = genFuncWheelItemValue();
277
+ function* genFuncWheelItemColor() {
278
+ const arrColor = [...Array(colors.length).keys()];
279
+ yield* shuffle([...arrColor]);
280
+ while (true) {
281
+ yield random(arrColor);
282
+ }
283
+ }
284
+ const generateWheelItemColor = genFuncWheelItemColor();
285
+ const arrItem = [...Array(nbWheelItems).keys()].map(() => {
286
+ return {
287
+ value: generateWheelItemValue.next().value,
288
+ indexColor: generateWheelItemColor.next().value,
289
+ };
290
+ });
291
+ return arrItem;
292
+ }
293
+ let identifiers;
294
+ let counter = -1;
295
+ let isValid = false;
296
+ while (!isValid && counter < 100) {
297
+ counter++;
298
+ const arrItem = createRandomArrItem(nbWheelItems);
299
+ const identifiersCandidate = {
300
+ arrItem,
301
+ typeAsked,
302
+ };
303
+ const [validPool] = getValidInvalidPools(identifiersCandidate);
304
+ isValid = validPool.length > 0;
305
+ if (isValid) {
306
+ identifiers = identifiersCandidate;
307
+ }
308
+ }
309
+ if (!isValid) {
310
+ identifiers = {
311
+ arrItem: [
312
+ {
313
+ value: 0,
314
+ indexColor: 0,
315
+ },
316
+ {
317
+ value: 1,
318
+ indexColor: 0,
319
+ },
320
+ {
321
+ value: 2,
322
+ indexColor: 0,
323
+ },
324
+ {
325
+ value: 3,
326
+ indexColor: 1,
327
+ },
328
+ {
329
+ value: 4,
330
+ indexColor: 0,
331
+ },
332
+ {
333
+ value: 5,
334
+ indexColor: 1,
335
+ },
336
+ {
337
+ value: 6,
338
+ indexColor: 2,
339
+ },
340
+ ],
341
+ typeAsked: "numéro",
342
+ };
343
+ }
344
+ return getQuestionFromIdentifiers(identifiers);
345
+ };
346
+ const getQuestionFromIdentifiers = (identifiers) => {
347
+ return {
348
+ instruction: getInstruction(identifiers),
349
+ ggbOptions: getGGBOptions(identifiers),
350
+ answerFormat: "tex",
351
+ identifiers,
352
+ hint: getHint(identifiers),
353
+ correction: getCorrection(identifiers),
354
+ };
355
+ };
356
+ export const pickEquiprobableTo = {
357
+ id: "pickEquiprobableTo",
358
+ connector: "=",
359
+ label: "Déterminer les situations équiprobables",
360
+ isSingleStep: true,
361
+ generator: (nb, opts) => getDistinctQuestions(() => getPickEquiprobableToQuestion(opts), nb),
362
+ qcmTimer: 60,
363
+ freeTimer: 60,
364
+ getPropositions,
365
+ subject: "Mathématiques",
366
+ getInstruction,
367
+ getHint,
368
+ getCorrection,
369
+ getQuestionFromIdentifiers,
370
+ hasHintAndCorrection: true,
371
+ answerType: "QCM",
372
+ isQCM: true,
373
+ hasGeogebra: true,
374
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"probaFromTableNoContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableNoContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AA2TF,KAAK,OAAO,GAAG;IAEb,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AA+BF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgBlE,CAAC"}
1
+ {"version":3,"file":"probaFromTableNoContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableNoContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAarC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAkUF,KAAK,OAAO,GAAG;IAEb,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AA+BF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAgBlE,CAAC"}
@@ -226,6 +226,13 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
226
226
  identifiers,
227
227
  hint: getHint(identifiers, opts),
228
228
  correction: getCorrection(identifiers, opts),
229
+ style: {
230
+ tableOptions: {
231
+ firstColumnIsHeader: true,
232
+ firstCellIsDivided: false,
233
+ firstRowIsHeader: true,
234
+ },
235
+ },
229
236
  };
230
237
  return question;
231
238
  };
@@ -1 +1 @@
1
- {"version":3,"file":"probaFromTableWithContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableWithContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;QACpB,uBAAuB,EAAE,MAAM,CAAC;QAChC,uBAAuB,EAAE,MAAM,CAAC;QAChC,mCAAmC,EAAE,MAAM,CAAC;KAC7C,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAqpBF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAsBF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBpE,CAAC"}
1
+ {"version":3,"file":"probaFromTableWithContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableWithContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;QACpB,uBAAuB,EAAE,MAAM,CAAC;QAChC,uBAAuB,EAAE,MAAM,CAAC;QAChC,mCAAmC,EAAE,MAAM,CAAC;KAC7C,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AA4pBF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAsBF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBpE,CAAC"}
@@ -329,6 +329,13 @@ const getQuestionFromIdentifiers = (identifiers, opts) => {
329
329
  hint: getHint(identifiers),
330
330
  correction: getCorrection(identifiers),
331
331
  options: opts,
332
+ style: {
333
+ tableOptions: {
334
+ firstColumnIsHeader: true,
335
+ firstCellIsDivided: false,
336
+ firstRowIsHeader: true,
337
+ },
338
+ },
332
339
  };
333
340
  return question;
334
341
  };
@@ -1 +1 @@
1
- {"version":3,"file":"averageWithTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageWithTable.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAQ9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAsHF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
1
+ {"version":3,"file":"averageWithTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageWithTable.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAQ9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AA4HF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
@@ -70,7 +70,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
70
70
  keys: [],
71
71
  answerFormat: "tex",
72
72
  identifiers,
73
- style: { tableHasNoHeader: true },
73
+ style: {
74
+ tableOptions: {
75
+ firstColumnIsHeader: true,
76
+ firstCellIsDivided: false,
77
+ firstRowIsHeader: false,
78
+ },
79
+ },
74
80
  hint: getHint(identifiers),
75
81
  correction: getCorrection(identifiers),
76
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"calculateMeanFromFrequencies.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/calculateMeanFromFrequencies.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAwGF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAqB9D,CAAC"}
1
+ {"version":3,"file":"calculateMeanFromFrequencies.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/calculateMeanFromFrequencies.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA+GF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAqB9D,CAAC"}
@@ -87,6 +87,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
87
87
  identifiers,
88
88
  hint: getHint(identifiers),
89
89
  correction: getCorrection(identifiers),
90
+ style: {
91
+ tableOptions: {
92
+ firstColumnIsHeader: true,
93
+ firstCellIsDivided: false,
94
+ firstRowIsHeader: false,
95
+ },
96
+ },
90
97
  };
91
98
  };
92
99
  export const calculateMeanFromFrequencies = {
@@ -1 +1 @@
1
- {"version":3,"file":"cumulativeSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/cumulativeSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4GF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAiB/C,CAAC"}
1
+ {"version":3,"file":"cumulativeSum.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/cumulativeSum.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAmHF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAiB/C,CAAC"}
@@ -84,6 +84,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
84
84
  identifiers,
85
85
  hint: getHint(identifiers),
86
86
  correction: getCorrection(identifiers),
87
+ style: {
88
+ tableOptions: {
89
+ firstColumnIsHeader: true,
90
+ firstCellIsDivided: false,
91
+ firstRowIsHeader: false,
92
+ },
93
+ },
87
94
  };
88
95
  };
89
96
  export const cumulativeSum = {
@@ -1 +1 @@
1
- {"version":3,"file":"etendueTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueTable.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AAuGF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
1
+ {"version":3,"file":"etendueTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/etendueTable.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AA6GF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
@@ -56,7 +56,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
56
56
  keys: [],
57
57
  answerFormat: "tex",
58
58
  identifiers,
59
- style: { tableHasNoHeader: true },
59
+ style: {
60
+ tableOptions: {
61
+ firstColumnIsHeader: true,
62
+ firstCellIsDivided: false,
63
+ firstRowIsHeader: false,
64
+ },
65
+ },
60
66
  hint: getHint(identifiers),
61
67
  correction: getCorrection(identifiers),
62
68
  };
@@ -1 +1 @@
1
- {"version":3,"file":"getQuartileProportionQuestion.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAgOF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAoB/D,CAAC"}
1
+ {"version":3,"file":"getQuartileProportionQuestion.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/getQuartileProportionQuestion.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAuOF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAoB/D,CAAC"}
@@ -173,6 +173,13 @@ const getQuestionFromIdentifiers = (identifiers) => ({
173
173
  identifiers,
174
174
  hint: getHint(identifiers),
175
175
  correction: getCorrection(identifiers),
176
+ style: {
177
+ tableOptions: {
178
+ firstColumnIsHeader: true,
179
+ firstCellIsDivided: false,
180
+ firstRowIsHeader: true,
181
+ },
182
+ },
176
183
  });
177
184
  export const getQuartileProportionQuestion = {
178
185
  id: "getQuartileProportionQuestion",
@@ -1 +1 @@
1
- {"version":3,"file":"interquartilesTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/interquartilesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAmHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAerD,CAAC"}
1
+ {"version":3,"file":"interquartilesTable.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/interquartilesTable.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAuHF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAerD,CAAC"}
@@ -92,7 +92,11 @@ const getQuestionFromIdentifiers = (identifiers) => {
92
92
  hint: getHint(identifiers),
93
93
  correction: getCorrection(identifiers),
94
94
  style: {
95
- tableHasNoHeader: true,
95
+ tableOptions: {
96
+ firstColumnIsHeader: true,
97
+ firstCellIsDivided: false,
98
+ firstRowIsHeader: false,
99
+ },
96
100
  },
97
101
  };
98
102
  return question;
@@ -1 +1 @@
1
- {"version":3,"file":"marginalAndConditionalFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAYT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AA4LF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
1
+ {"version":3,"file":"marginalAndConditionalFrequency.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,QAAQ,EAYT,MAAM,sBAAsB,CAAC;AAG9B,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAmMF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
@@ -140,6 +140,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
140
140
  keys: ["f", "cap", "underscore"],
141
141
  answerFormat: "tex",
142
142
  identifiers,
143
+ style: {
144
+ tableOptions: {
145
+ firstColumnIsHeader: true,
146
+ firstCellIsDivided: false,
147
+ firstRowIsHeader: true,
148
+ },
149
+ },
143
150
  };
144
151
  return question;
145
152
  };
@@ -4,7 +4,9 @@ type Identifiers = {
4
4
  };
5
5
  type Options = {
6
6
  nbValues: string;
7
+ isOrdered: boolean;
7
8
  };
8
9
  export declare const medianWithList: Exercise<Identifiers, Options>;
10
+ export declare const medianWithListUnorderedVariant: Exercise<Identifiers, Options>;
9
11
  export {};
10
12
  //# sourceMappingURL=medianWithList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"medianWithList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/medianWithList.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAkBT,MAAM,sBAAsB,CAAC;AAE9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AA2FF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAsBF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAezD,CAAC"}
1
+ {"version":3,"file":"medianWithList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/medianWithList.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EAkBT,MAAM,sBAAsB,CAAC;AAE9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAyIF,KAAK,OAAO,GAAG;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAsBF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAkBzD,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBzE,CAAC"}