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,360 @@
1
+ import { shuffleProps, addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { blueLight, red } from "../../../../geogebra/colors.js";
4
+ import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
5
+ import { randint } from "../../../../math/utils/random/randint.js";
6
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
7
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
9
+ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
10
+ import { random, randomMany } from "../../../../utils/alea/random.js";
11
+ import { shuffle } from "../../../../utils/alea/shuffle.js";
12
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
13
+ const rectangularPrismSectionGGBCommands = (AB, AD, AE, offset, isShowSectionPlane, planeType) => {
14
+ return [
15
+ //hide xOyPlane
16
+ `SetFilling(xOyPlane, 0)`,
17
+ //points
18
+ `A = Point({${AD},${AB},${AE}})`,
19
+ `ShowLabel(A,true)`,
20
+ `B = Point({${AD},0,${AE}})`,
21
+ `ShowLabel(B,true)`,
22
+ `C = Point({0,0,${AE}})`,
23
+ `ShowLabel(C,true)`,
24
+ `D = Point({0,${AB},${AE}})`,
25
+ `ShowLabel(D,true)`,
26
+ `E = Point({${AD},${AB},0})`,
27
+ `ShowLabel(E,true)`,
28
+ `F = Point({${AD},0,0})`,
29
+ `ShowLabel(F,true)`,
30
+ `G = Point({0,0,0})`,
31
+ `ShowLabel(G,true)`,
32
+ `H = Point({0,${AB},0})`,
33
+ `ShowLabel(H,true)`,
34
+ ...(() => {
35
+ switch (planeType) {
36
+ case "ABCD":
37
+ {
38
+ return [
39
+ `I = Point({${AD},${AB},${AE - offset}})`,
40
+ `ShowLabel(I,true)`,
41
+ ];
42
+ }
43
+ break;
44
+ case "ABFE":
45
+ {
46
+ return [
47
+ `I = Point({${AD - offset},${AB},${AE}})`,
48
+ `ShowLabel(I,true)`,
49
+ ];
50
+ }
51
+ break;
52
+ case "ADHE":
53
+ {
54
+ return [
55
+ `I = Point({${AD},${AB - offset},${AE}})`,
56
+ `ShowLabel(I,true)`,
57
+ ];
58
+ }
59
+ break;
60
+ default:
61
+ throw new Error("unsupported planeType: " + planeType);
62
+ }
63
+ })(),
64
+ //prism
65
+ `Pri = Prism(A,B,C,D,E)`,
66
+ `SetColor(Pri, "#d3dde6ff")`,
67
+ `SetFilling(Pri, 0.36)`,
68
+ `SetLineThickness(Pri, 1)`,
69
+ //plane
70
+ ...(isShowSectionPlane
71
+ ? (() => {
72
+ switch (planeType) {
73
+ case "ABCD":
74
+ {
75
+ return [
76
+ `Pl = Plane((0,0,${AE - offset}), (0,1,${AE - offset}), (0,1,${AE - offset}))`,
77
+ `SetColor(Pl, "${blueLight}")`,
78
+ `SetFilling(Pl, 0.23)`,
79
+ ];
80
+ }
81
+ break;
82
+ case "ABFE":
83
+ {
84
+ return [
85
+ `Pl = Plane((${AD - offset},0,0), (${AD - offset},1,0), (${AD - offset},0,1))`,
86
+ `SetColor(Pl, "${blueLight}")`,
87
+ `SetFilling(Pl, 0.23)`,
88
+ ];
89
+ }
90
+ break;
91
+ case "ADHE":
92
+ {
93
+ return [
94
+ `Pl = Plane((0,${AB - offset},0), (0,${AB - offset},1), (1,${AB - offset},0))`,
95
+ `SetColor(Pl, "${blueLight}")`,
96
+ `SetFilling(Pl, 0.23)`,
97
+ ];
98
+ }
99
+ break;
100
+ default:
101
+ throw new Error("unsupported planeType: " + planeType);
102
+ }
103
+ })()
104
+ : []),
105
+ //section
106
+ ...(() => {
107
+ switch (planeType) {
108
+ case "ABCD":
109
+ {
110
+ return [
111
+ `s = Polygon((0,0,${AE - offset}), (${AD},0,${AE - offset}), (${AD},${AB},${AE - offset}), (0,${AB},${AE - offset}))`,
112
+ `SetColor(s, "${red}")`,
113
+ // `SetFilling(s, 0.36)`,
114
+ `SetLineThickness(s, 3)`,
115
+ ];
116
+ }
117
+ break;
118
+ case "ABFE":
119
+ {
120
+ return [
121
+ `s = Polygon((${AD - offset},0,0), (${AD - offset},0,${AE}), (${AD - offset},${AB},${AE}), (${AD - offset},${AB},0))`,
122
+ `SetColor(s, "${red}")`,
123
+ // `SetFilling(s, 0.36)`,
124
+ `SetLineThickness(s, 3)`,
125
+ ];
126
+ }
127
+ break;
128
+ case "ADHE":
129
+ {
130
+ return [
131
+ `s = Polygon((0,${AB - offset},0), (0,${AB - offset},${AE}), (${AD},${AB - offset},${AE}), (${AD},${AB - offset},0))`,
132
+ `SetColor(s, "${red}")`,
133
+ // `SetFilling(s, 0.36)`,
134
+ `SetLineThickness(s, 3)`,
135
+ ];
136
+ }
137
+ break;
138
+ default:
139
+ throw new Error("unsupported planeType: " + planeType);
140
+ }
141
+ })(),
142
+ //center view
143
+ `CenterView(A)`,
144
+ ];
145
+ };
146
+ const getInstruction = (identifiers) => {
147
+ const { AB, AD, AE, offset, planeType } = identifiers;
148
+ return `Soit $ABCDEFGH$ un pavé droit tel que $AB = ${AB} \\ \\textrm{cm}$, $AD = ${AD} \\ \\textrm{cm}$ et $AE = ${AE} \\ \\textrm{cm}$.
149
+
150
+ Un plan parallèle à $${planeType}$ coupe $ABCDEFGH$ en une section telle que $AI = ${offset.frenchify()}\\ \\textrm{cm}$.
151
+
152
+ Quelle est l'aire de la section plane en $\\textrm{cm}^2$ ?`;
153
+ };
154
+ const getAnswerNode = (identifiers) => {
155
+ const { AB, AD, AE, planeType } = identifiers;
156
+ const nodeArea = (() => {
157
+ switch (planeType) {
158
+ case "ABCD":
159
+ {
160
+ return multiply(AB, AD);
161
+ }
162
+ break;
163
+ case "ABFE":
164
+ {
165
+ return multiply(AB, AE);
166
+ }
167
+ break;
168
+ case "ADHE":
169
+ {
170
+ return multiply(AD, AE);
171
+ }
172
+ break;
173
+ default:
174
+ throw new Error("unsupported planeType: " + planeType);
175
+ }
176
+ })();
177
+ return nodeArea.simplify();
178
+ };
179
+ const getAnswer = (identifiers) => {
180
+ return getAnswerNode(identifiers).toTex();
181
+ };
182
+ const getHint = () => {
183
+ return `Utilise la formule qui donne l'aire d'un rectangle.`;
184
+ };
185
+ const getCorrection = (identifiers) => {
186
+ const { AB, AD, AE, planeType } = identifiers;
187
+ const [length1, length2] = (() => {
188
+ switch (planeType) {
189
+ case "ABCD":
190
+ return [AB, AD];
191
+ case "ABFE":
192
+ return [AB, AE];
193
+ case "ADHE":
194
+ return [AD, AE];
195
+ default:
196
+ throw new Error("unsupported planeType: " + planeType);
197
+ }
198
+ })();
199
+ return `La section est un rectangle
200
+ ${(() => {
201
+ switch (planeType) {
202
+ case "ABCD":
203
+ return `dont un des côtés est de longueur $AB$ et l'autre de longueur $AD$.`;
204
+ case "ABFE":
205
+ return `dont un des côtés est de longueur $AB$ et l'autre de longueur $AE$.`;
206
+ case "ADHE":
207
+ return `dont un des côtés est de longueur $AD$ et l'autre de longueur $AE$.`;
208
+ default:
209
+ throw new Error("unsupported planeType: " + planeType);
210
+ }
211
+ })()}
212
+
213
+ L'aire vaut donc :
214
+
215
+ $$
216
+ \\mathcal{A}_{\\text{rectangle}} = ${length1} \\times ${length2} = ${getAnswer(identifiers)} \\ \\textrm{cm}^2
217
+ $$
218
+
219
+ `;
220
+ };
221
+ const getCorrectionGGBOptions = (identifiers) => {
222
+ const { AB, AD, AE, offset, planeType } = identifiers;
223
+ const commands = [
224
+ ...rectangularPrismSectionGGBCommands(AB, AD, AE, offset, false, planeType),
225
+ `SetFilling(s, 0.36)`,
226
+ ];
227
+ const ggb = new GeogebraConstructor({
228
+ commands,
229
+ is3D: true,
230
+ xAxis: {
231
+ hidden: true,
232
+ },
233
+ yAxis: {
234
+ hidden: true,
235
+ },
236
+ zAxis: {
237
+ hidden: true,
238
+ },
239
+ });
240
+ const xMax = AD;
241
+ const xMin = 0;
242
+ const yMax = AB;
243
+ const yMin = 0;
244
+ const zMax = AE;
245
+ const zMin = 0;
246
+ return ggb.getOptions({
247
+ coords: [xMin, xMax, yMin, yMax, zMin, zMax],
248
+ });
249
+ };
250
+ const getGGBOptions = (identifiers) => {
251
+ const { AB, AD, AE, offset, planeType } = identifiers;
252
+ const commands = [
253
+ ...rectangularPrismSectionGGBCommands(AB, AD, AE, offset, true, planeType),
254
+ ];
255
+ const ggb = new GeogebraConstructor({
256
+ commands,
257
+ is3D: true,
258
+ xAxis: {
259
+ hidden: true,
260
+ },
261
+ yAxis: {
262
+ hidden: true,
263
+ },
264
+ zAxis: {
265
+ hidden: true,
266
+ },
267
+ });
268
+ const xMax = AD;
269
+ const xMin = 0;
270
+ const yMax = AB;
271
+ const yMin = 0;
272
+ const zMax = AE;
273
+ const zMin = 0;
274
+ return ggb.getOptions({
275
+ coords: [xMin, xMax, yMin, yMax, zMin, zMax],
276
+ });
277
+ };
278
+ const getKeys = () => {
279
+ return [];
280
+ };
281
+ const isAnswerValid = (ans, { answer }) => {
282
+ try {
283
+ const nodeAns = parseAlgebraic(ans);
284
+ const nodeAnswer = parseAlgebraic(answer);
285
+ return substract(nodeAns, nodeAnswer).evaluate() === 0;
286
+ }
287
+ catch (e) {
288
+ return handleVEAError(e);
289
+ }
290
+ };
291
+ const getPropositions = (n, { answer, ...identifiers }) => {
292
+ const { AB, AD, AE } = identifiers;
293
+ const propositions = [];
294
+ addValidProp(propositions, answer);
295
+ //wrong side
296
+ ["ABCD", "ADHE", "ABFE"].forEach((planeType) => {
297
+ const identifiersWrong = Object.assign({}, identifiers, { planeType });
298
+ tryToAddWrongProp(propositions, getAnswer(identifiersWrong));
299
+ });
300
+ //perimeter
301
+ [
302
+ [AB, AD],
303
+ [AB, AE],
304
+ [AD, AE],
305
+ ].forEach(([length1, length2]) => {
306
+ const nodePerimeter = multiply(2, add(length1, length2));
307
+ tryToAddWrongProp(propositions, nodePerimeter.evaluate().frenchify());
308
+ });
309
+ return shuffleProps(propositions, n);
310
+ };
311
+ const getAreaOfRectangularPrismSectionQuestion = () => {
312
+ const planeType = random(["ABCD", "ADHE", "ABFE"]);
313
+ const [l1, l2] = randomMany([...Array(17).keys()].map((i) => i + 5), 2);
314
+ const [AB, AD, AE] = shuffle([l1, l2, randint(5, 21)]);
315
+ const offset = (() => {
316
+ switch (planeType) {
317
+ case "ABCD":
318
+ return randint(2, AE);
319
+ case "ADHE":
320
+ return randint(2, AB);
321
+ case "ABFE":
322
+ return randint(2, AD);
323
+ default:
324
+ throw new Error("unsupported planeType: " + planeType);
325
+ }
326
+ })();
327
+ const identifiers = { AB, AD, AE, offset, planeType };
328
+ return getQuestionFromIdentifiers(identifiers);
329
+ };
330
+ const getQuestionFromIdentifiers = (identifiers) => {
331
+ const question = {
332
+ instruction: getInstruction(identifiers),
333
+ answer: getAnswer(identifiers),
334
+ hint: getHint(identifiers),
335
+ keys: getKeys(identifiers),
336
+ correction: getCorrection(identifiers),
337
+ ggbOptions: getGGBOptions(identifiers),
338
+ correctionGgbOptions: getCorrectionGGBOptions(identifiers),
339
+ answerFormat: "tex",
340
+ identifiers,
341
+ };
342
+ return question;
343
+ };
344
+ export const areaOfRectangularPrismSection = {
345
+ id: "areaOfRectangularPrismSection",
346
+ connector: "=",
347
+ label: "Calculer l'aire d'une section plane de pavé droit",
348
+ isSingleStep: true,
349
+ generator: (nb) => getDistinctQuestions(() => getAreaOfRectangularPrismSectionQuestion(), nb),
350
+ qcmTimer: 60,
351
+ freeTimer: 60,
352
+ isAnswerValid,
353
+ getPropositions,
354
+ subject: "Mathématiques",
355
+ getQuestionFromIdentifiers,
356
+ getHint,
357
+ getCorrection,
358
+ hasHintAndCorrection: true,
359
+ hasGeogebra: true,
360
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ isDiameterGiven: boolean;
4
+ radius: number;
5
+ height: number;
6
+ };
7
+ export declare const areaOfSphereSection: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=areaOfSphereSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"areaOfSphereSection.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/sections/areaOfSphereSection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAgErC,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAuPF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAiBrD,CAAC"}
@@ -0,0 +1,272 @@
1
+ import { shuffleProps, addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { blueLight, greenMain, red } from "../../../../geogebra/colors.js";
4
+ import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
5
+ import { SpacePoint } from "../../../../math/geometry/spacePoint.js";
6
+ import { randint } from "../../../../math/utils/random/randint.js";
7
+ import { round } from "../../../../math/utils/round.js";
8
+ import { sqrt } from "../../../../tree/nodes/functions/sqrtNode.js";
9
+ import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
10
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
11
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
12
+ import { power } from "../../../../tree/nodes/operators/powerNode.js";
13
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
14
+ import { parseAlgebraic } from "../../../../tree/parsers/latexParser.js";
15
+ import { probaFlip } from "../../../../utils/alea/probaFlip.js";
16
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
17
+ const getSpacePointP = (radius, height) => {
18
+ const nodeWidth = sqrt(substract(power(radius, 2), power(height, 2)));
19
+ return new SpacePoint("P", nodeWidth, (0).toTree(), height.toTree());
20
+ };
21
+ const sphereSectionGGBCommands = (radius, height, isShowSectionPlane) => {
22
+ const spacePointP = getSpacePointP(radius, height);
23
+ const width = spacePointP.x.evaluate();
24
+ return [
25
+ //hide xOyPlane
26
+ `SetFilling(xOyPlane, 0)`,
27
+ //sphere
28
+ `Sph = Sphere((0,0,0), 0.99 * ${radius})`,
29
+ `SetColor(Sph, "#d3dde6ff")`,
30
+ `SetFilling(Sph, 0.36)`,
31
+ `SetLineThickness(Sph, 1)`,
32
+ //plane
33
+ ...(isShowSectionPlane
34
+ ? [
35
+ `Pl = Plane((${width}, 0, ${height}), (0, ${width}, ${height}), (${-width}, 0, ${height}))`,
36
+ `SetColor(Pl, "${blueLight}")`,
37
+ `SetFilling(Pl, 0.23)`,
38
+ ]
39
+ : []),
40
+ //circles and arcs
41
+ //section
42
+ `d = Circle((${width}, 0, ${height}), (0, ${width}, ${height}), (${-width}, 0, ${height}))`,
43
+ `SetColor(d, "${red}")`,
44
+ // `SetFilling(d, 0.36)`,
45
+ `SetLineThickness(d, 3)`,
46
+ //points
47
+ `O = Point({0,0,0})`,
48
+ `I = Point({0,0,${height}})`,
49
+ //center view
50
+ `CenterView(Point({0,0,0}))`,
51
+ ];
52
+ };
53
+ const getInstruction = (identifiers) => {
54
+ const { radius, isDiameterGiven, height } = identifiers;
55
+ return `Soit $\\mathcal{S}$ une sphère de centre $O$ et de ${isDiameterGiven ? "diamètre" : "rayon"} $${isDiameterGiven ? 2 * radius : radius} \\ \\textrm{cm}$.
56
+
57
+ Un plan coupe $\\mathcal{S}$ en un cercle $\\mathcal{C}$ de centre $I$ tel que $OI = ${height.frenchify()}\\ \\textrm{cm}$.
58
+
59
+ Quelle est l'aire du cercle $\\mathcal{C}$ en $\\textrm{cm}^2$ ?
60
+ On donnera le résultat sous forme arrondie à deux décimales.`;
61
+ };
62
+ const getAnswerNode = (identifiers) => {
63
+ const { radius, height } = identifiers;
64
+ const nodeWidth = sqrt(substract(power(radius, 2), power(height, 2)));
65
+ const nodeArea = multiply(PiNode, power(nodeWidth, 2));
66
+ const nodeAreaRounded = round(nodeArea.evaluate(), 2).toTree();
67
+ return nodeAreaRounded;
68
+ };
69
+ const getAnswer = (identifiers) => {
70
+ return getAnswerNode(identifiers).toTex();
71
+ };
72
+ const getHint = () => {
73
+ return `Trouve un moyen de calculer le rayon de $\\mathcal{S}$.
74
+
75
+ Tu peux peut-être isoler un triangle particulier dont tu pourrais calculer la longueur d'un des côtés.`;
76
+ };
77
+ const getCorrection = (identifiers) => {
78
+ const { radius, height } = identifiers;
79
+ return `On nomme $P$ un point du cercle $\\mathcal{C}$.
80
+
81
+ Le triangle $OPI$ est un triangle rectangle.
82
+
83
+ Le point $P$ est un point de la sphère $\\mathcal{S}$ donc $OP=${radius} \\ \\textrm{cm}$.
84
+
85
+ D'après le théorème de Pythagore :
86
+
87
+ $$
88
+ {OP}^2={IO}^2+{IP}^2
89
+ $$
90
+
91
+ $$
92
+ {IP}^2={OP}^2-{IO}^2
93
+ $$
94
+
95
+ $$
96
+ {IP}^2={${radius}}^2-{${height}}^2
97
+ $$
98
+
99
+ L'aire du cercle est donc :
100
+
101
+ $$
102
+ \\mathcal{A}_{\\mathcal{C}} = \\pi \\times {IP}^2
103
+ $$
104
+
105
+ $$
106
+ \\mathcal{A}_{\\mathcal{C}} \\approx ${getAnswer(identifiers)} \\ \\textrm{cm}^2
107
+ $$
108
+
109
+ `;
110
+ };
111
+ const getCorrectionGGBOptions = (identifiers) => {
112
+ const { radius, height } = identifiers;
113
+ const spacePointP = getSpacePointP(radius, height);
114
+ const commands = [
115
+ ...sphereSectionGGBCommands(radius, height, false),
116
+ `SetFilling(d, 0.36)`,
117
+ //point
118
+ `P = Point({${spacePointP.x.evaluate()},${spacePointP.y.evaluate()},${spacePointP.z.evaluate()}})`,
119
+ //segments
120
+ `S_PI = Segment(P,I)`,
121
+ `SetColor(S_PI, "${greenMain}")`,
122
+ `SetCaption(S_PI,"$\\sqrt{${radius}^2-${height}^2}$")`,
123
+ `ShowLabel(S_PI,true)`,
124
+ `S_IO = Segment(I,O)`,
125
+ `SetCaption(S_IO,"${height}")`,
126
+ `ShowLabel(S_IO,true)`,
127
+ `S_OP = Segment(O,P)`,
128
+ `SetCaption(S_OP,"${radius}")`,
129
+ `ShowLabel(S_OP,true)`,
130
+ //angle
131
+ `a_OIP = Angle(O,I,P)`,
132
+ `ShowLabel(a_OIP,false)`,
133
+ ];
134
+ const ggb = new GeogebraConstructor({
135
+ commands,
136
+ is3D: true,
137
+ xAxis: {
138
+ hidden: true,
139
+ },
140
+ yAxis: {
141
+ hidden: true,
142
+ },
143
+ zAxis: {
144
+ hidden: true,
145
+ },
146
+ });
147
+ const xMax = radius;
148
+ const xMin = -xMax;
149
+ const yMax = radius;
150
+ const yMin = -yMax;
151
+ const zMax = radius;
152
+ const zMin = -zMax;
153
+ return ggb.getOptions({
154
+ coords: [xMin, xMax, yMin, yMax, zMin, zMax],
155
+ });
156
+ };
157
+ const getGGBOptions = (identifiers) => {
158
+ const { radius, height } = identifiers;
159
+ const commands = [...sphereSectionGGBCommands(radius, height, true)];
160
+ const ggb = new GeogebraConstructor({
161
+ commands,
162
+ is3D: true,
163
+ xAxis: {
164
+ hidden: true,
165
+ },
166
+ yAxis: {
167
+ hidden: true,
168
+ },
169
+ zAxis: {
170
+ hidden: true,
171
+ },
172
+ });
173
+ const xMax = radius;
174
+ const xMin = -xMax;
175
+ const yMax = radius;
176
+ const yMin = -yMax;
177
+ const zMax = radius;
178
+ const zMin = -zMax;
179
+ return ggb.getOptions({
180
+ coords: [xMin, xMax, yMin, yMax, zMin, zMax],
181
+ });
182
+ };
183
+ const getKeys = () => {
184
+ return [];
185
+ };
186
+ const isAnswerValid = (ans, { answer }) => {
187
+ try {
188
+ const nodeAns = parseAlgebraic(ans);
189
+ const nodeAnswer = parseAlgebraic(answer);
190
+ return substract(nodeAns, nodeAnswer).evaluate() === 0;
191
+ }
192
+ catch (e) {
193
+ return handleVEAError(e);
194
+ }
195
+ };
196
+ const getPropositions = (n, { answer, ...identifiers }) => {
197
+ const { radius, height } = identifiers;
198
+ const propositions = [];
199
+ const nodeWidth = sqrt(substract(power(radius, 2), power(height, 2)));
200
+ const nodeArea = multiply(PiNode, power(nodeWidth, 2));
201
+ const nodeAreaRounded = round(nodeArea.evaluate(), 2).toTree();
202
+ addValidProp(propositions, nodeAreaRounded.toTex());
203
+ const nodeWidthRounded = round(nodeWidth.evaluate(), 2).toTree();
204
+ //stops at step1
205
+ {
206
+ tryToAddWrongProp(propositions, nodeWidthRounded.toTex());
207
+ }
208
+ //rounds before last step
209
+ {
210
+ const nodeArea = multiply(PiNode, power(nodeWidthRounded, 2));
211
+ const nodeAreaRounded = round(nodeArea.evaluate(), 2).toTree();
212
+ tryToAddWrongProp(propositions, nodeAreaRounded.toTex());
213
+ }
214
+ //wrong application of pythagore
215
+ {
216
+ const nodeWidth = sqrt(add(power(radius, 2), power(height, 2)));
217
+ const nodeArea = multiply(PiNode, power(nodeWidth, 2));
218
+ const nodeAreaRounded = round(nodeArea.evaluate(), 2).toTree();
219
+ tryToAddWrongProp(propositions, nodeAreaRounded.toTex());
220
+ }
221
+ //wrong formula: circumference
222
+ {
223
+ const nodeCircumference = multiply(multiply(2, PiNode), nodeWidth);
224
+ const nodeCircumferenceRounded = round(nodeCircumference.evaluate(), 2).toTree();
225
+ tryToAddWrongProp(propositions, nodeCircumferenceRounded.toTex());
226
+ }
227
+ //wrong formula: sphere area
228
+ {
229
+ const nodeCircumference = multiply(multiply(4, PiNode), power(nodeWidth, 2));
230
+ const nodeCircumferenceRounded = round(nodeCircumference.evaluate(), 2).toTree();
231
+ tryToAddWrongProp(propositions, nodeCircumferenceRounded.toTex());
232
+ }
233
+ return shuffleProps(propositions, n);
234
+ };
235
+ const getAreaOfSphereSectionQuestion = () => {
236
+ const isDiameterGiven = probaFlip(0.23);
237
+ const radius = randint(5, 21);
238
+ const height = randint(1, radius);
239
+ const identifiers = { radius, isDiameterGiven, height };
240
+ return getQuestionFromIdentifiers(identifiers);
241
+ };
242
+ const getQuestionFromIdentifiers = (identifiers) => {
243
+ const question = {
244
+ instruction: getInstruction(identifiers),
245
+ answer: getAnswer(identifiers),
246
+ hint: getHint(identifiers),
247
+ keys: getKeys(identifiers),
248
+ correction: getCorrection(identifiers),
249
+ ggbOptions: getGGBOptions(identifiers),
250
+ correctionGgbOptions: getCorrectionGGBOptions(identifiers),
251
+ answerFormat: "tex",
252
+ identifiers,
253
+ };
254
+ return question;
255
+ };
256
+ export const areaOfSphereSection = {
257
+ id: "areaOfSphereSection",
258
+ connector: "=",
259
+ label: "Calculer l'aire d'une section plane de sphère",
260
+ isSingleStep: true,
261
+ generator: (nb) => getDistinctQuestions(getAreaOfSphereSectionQuestion, nb),
262
+ qcmTimer: 60,
263
+ freeTimer: 60,
264
+ isAnswerValid,
265
+ getPropositions,
266
+ subject: "Mathématiques",
267
+ getQuestionFromIdentifiers,
268
+ getHint,
269
+ getCorrection,
270
+ hasHintAndCorrection: true,
271
+ hasGeogebra: true,
272
+ };
@@ -0,0 +1,9 @@
1
+ export * from "./recognizeSectionsOfSphereOrBall.js";
2
+ export * from "./recognizeSectionsOfCylinder.js";
3
+ export * from "./recognizeSectionsOfCone.js";
4
+ export * from "./recognizeSectionsOfRectangularPrism.js";
5
+ export * from "./areaOfSphereSection.js";
6
+ export * from "./areaOfCylinderSection.js";
7
+ export * from "./areaOfConeSection.js";
8
+ export * from "./areaOfRectangularPrismSection.js";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/sections/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oCAAoC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from "./recognizeSectionsOfSphereOrBall.js";
2
+ export * from "./recognizeSectionsOfCylinder.js";
3
+ export * from "./recognizeSectionsOfCone.js";
4
+ export * from "./recognizeSectionsOfRectangularPrism.js";
5
+ export * from "./areaOfSphereSection.js";
6
+ export * from "./areaOfCylinderSection.js";
7
+ export * from "./areaOfConeSection.js";
8
+ export * from "./areaOfRectangularPrismSection.js";
@@ -0,0 +1,11 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ radius: number;
4
+ height: number;
5
+ isDiameterGiven: boolean;
6
+ isHollow: boolean;
7
+ isBaseCircle: boolean;
8
+ };
9
+ export declare const recognizeSectionsOfCone: Exercise<Identifiers>;
10
+ export {};
11
+ //# sourceMappingURL=recognizeSectionsOfCone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recognizeSectionsOfCone.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/spaceGeometry/sections/recognizeSectionsOfCone.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAiTF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAiBzD,CAAC"}