math-exercises 3.0.171 → 3.0.173

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 (418) hide show
  1. package/lib/exercises/math/derivation/variations/signVarTable3dDegree.js +38 -10
  2. package/lib/exercises/math/derivation/variations/signVarTableFromDerivativeGraph.d.ts.map +1 -1
  3. package/lib/exercises/math/derivation/variations/signVarTableFromDerivativeGraph.js +7 -4
  4. package/lib/exercises/math/derivation/variations/signVarTableFromGraph.d.ts.map +1 -1
  5. package/lib/exercises/math/derivation/variations/signVarTableFromGraph.js +2 -3
  6. package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.d.ts.map +1 -1
  7. package/lib/exercises/math/functions/trinoms/devForm/variationsFromAlgebricForm.js +12 -0
  8. package/lib/exercises/math/functions/trinoms/parabole/index.d.ts +2 -0
  9. package/lib/exercises/math/functions/trinoms/parabole/index.d.ts.map +1 -1
  10. package/lib/exercises/math/functions/trinoms/parabole/index.js +2 -0
  11. package/lib/exercises/math/functions/trinoms/parabole/parabolaVarTable.d.ts +8 -0
  12. package/lib/exercises/math/functions/trinoms/parabole/parabolaVarTable.d.ts.map +1 -0
  13. package/lib/exercises/math/functions/trinoms/parabole/parabolaVarTable.js +106 -0
  14. package/lib/exercises/math/functions/trinoms/parabole/paraboleSolveGraphEquation.d.ts +14 -0
  15. package/lib/exercises/math/functions/trinoms/parabole/paraboleSolveGraphEquation.d.ts.map +1 -0
  16. package/lib/exercises/math/functions/trinoms/parabole/paraboleSolveGraphEquation.js +186 -0
  17. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.d.ts +6 -2
  18. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.d.ts.map +1 -1
  19. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumTypeFromAlgebricForm.js +98 -13
  20. package/lib/exercises/math/functions/variations/partialVarTableFromGraph.d.ts.map +1 -1
  21. package/lib/exercises/math/functions/variations/partialVarTableFromGraph.js +2 -1
  22. package/lib/exercises/math/functions/variations/varTableFromGraph.d.ts.map +1 -1
  23. package/lib/exercises/math/functions/variations/varTableFromGraph.js +2 -1
  24. package/lib/exercises/math/functions/variations/varTableFromSentences.d.ts.map +1 -1
  25. package/lib/exercises/math/functions/variations/varTableFromSentences.js +2 -1
  26. package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.d.ts.map +1 -1
  27. package/lib/exercises/math/geometry/circles/circleCenterAndRadiusFromEquation.js +0 -2
  28. package/lib/exercises/math/geometry/lines/index.d.ts +1 -0
  29. package/lib/exercises/math/geometry/lines/index.d.ts.map +1 -1
  30. package/lib/exercises/math/geometry/lines/index.js +1 -0
  31. package/lib/exercises/math/geometry/lines/readLineNormalVectorOnGraph.d.ts +13 -0
  32. package/lib/exercises/math/geometry/lines/readLineNormalVectorOnGraph.d.ts.map +1 -0
  33. package/lib/exercises/math/geometry/lines/readLineNormalVectorOnGraph.js +195 -0
  34. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.d.ts.map +1 -1
  35. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +64 -60
  36. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts +1 -0
  37. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.d.ts.map +1 -1
  38. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiBH.js +173 -47
  39. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.d.ts.map +1 -1
  40. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +112 -46
  41. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.d.ts.map +1 -1
  42. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductInOrthonormalBasisIJ.js +6 -0
  43. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.d.ts.map +1 -1
  44. package/lib/exercises/math/geometry/vectors/scalarProduct/alg/scalarProductLamdbaULambdaV.js +60 -82
  45. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.d.ts.map +1 -1
  46. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +92 -6
  47. package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts +6 -1
  48. package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts.map +1 -1
  49. package/lib/exercises/math/geometry/vectors/scalarProduct/index.js +6 -1
  50. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.d.ts.map +1 -1
  51. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsBasisIJ.js +6 -0
  52. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsOrthogonalVecsUsingCoords.js +1 -1
  53. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.d.ts.map +1 -1
  54. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnCircle.js +15 -5
  55. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.d.ts.map +1 -1
  56. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsPointOnPerpendicularBisector.js +18 -14
  57. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.d.ts.map +1 -1
  58. package/lib/exercises/math/geometry/vectors/scalarProduct/orth/scalarProductIsRightTriangleUsingPointCoords.js +15 -5
  59. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.d.ts.map +1 -1
  60. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductComputeBH.js +38 -4
  61. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.d.ts.map +1 -1
  62. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOfVectsOnGrid1.js +77 -26
  63. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.d.ts.map +1 -1
  64. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductParallelogramDiagonalPlus.js +6 -7
  65. package/lib/exercises/math/probaStat/basicProbas/calculateProbaFromProbaLaw.js +1 -1
  66. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  67. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +3 -16
  68. package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.d.ts +14 -0
  69. package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.d.ts.map +1 -0
  70. package/lib/exercises/math/probaStat/randomVariable/decideWhichGameIsLessRisky.js +167 -0
  71. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.d.ts.map +1 -1
  72. package/lib/exercises/math/probaStat/randomVariable/findValueForFairRandomVariable.js +29 -56
  73. package/lib/exercises/math/probaStat/randomVariable/index.d.ts +8 -0
  74. package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
  75. package/lib/exercises/math/probaStat/randomVariable/index.js +9 -0
  76. package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.d.ts.map +1 -1
  77. package/lib/exercises/math/probaStat/randomVariable/isTableProbabilityLaw.js +6 -6
  78. package/lib/exercises/math/probaStat/randomVariable/missingValueInRandomVariableProbabilityLaw.d.ts +9 -0
  79. package/lib/exercises/math/probaStat/randomVariable/missingValueInRandomVariableProbabilityLaw.d.ts.map +1 -0
  80. package/lib/exercises/math/probaStat/randomVariable/missingValueInRandomVariableProbabilityLaw.js +119 -0
  81. package/lib/exercises/math/probaStat/randomVariable/randomVariableAverage.js +1 -1
  82. package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.d.ts +9 -0
  83. package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.d.ts.map +1 -0
  84. package/lib/exercises/math/probaStat/randomVariable/randomVariableFindMissingProbabilityInLaw.js +116 -0
  85. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts +11 -0
  86. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.d.ts.map +1 -0
  87. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationAverage.js +112 -0
  88. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts +9 -0
  89. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.d.ts.map +1 -0
  90. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationComputeProbability.js +176 -0
  91. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts +8 -0
  92. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.d.ts.map +1 -0
  93. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationIsGameFavorable.js +94 -0
  94. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts +9 -0
  95. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -0
  96. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +162 -0
  97. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts +8 -0
  98. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.d.ts.map +1 -0
  99. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationStandardDeviation.js +133 -0
  100. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts +8 -0
  101. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.d.ts.map +1 -0
  102. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationValues.js +211 -0
  103. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts +8 -0
  104. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.d.ts.map +1 -0
  105. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationVariance.js +113 -0
  106. package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +1 -1
  107. package/lib/exercises/math/probaStat/randomVariable/randomVariableVariance.js +1 -1
  108. package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.d.ts +31 -0
  109. package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.d.ts.map +1 -0
  110. package/lib/exercises/math/probaStat/randomVariable/utils/buildVAOfGivenAverage.js +192 -0
  111. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts +40 -11
  112. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
  113. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +172 -30
  114. package/lib/exercises/math/probaStat/stats1var/medianWithList.d.ts.map +1 -1
  115. package/lib/exercises/math/probaStat/stats1var/medianWithList.js +16 -2
  116. package/lib/exercises/math/python/sequences/index.d.ts +8 -0
  117. package/lib/exercises/math/python/sequences/index.d.ts.map +1 -0
  118. package/lib/exercises/math/python/sequences/index.js +7 -0
  119. package/lib/exercises/math/python/sequences/pySequenceFactorialInstructionFalseOneOut.d.ts +11 -0
  120. package/lib/exercises/math/python/sequences/pySequenceFactorialInstructionFalseOneOut.d.ts.map +1 -0
  121. package/lib/exercises/math/python/sequences/pySequenceFactorialInstructionFalseOneOut.js +274 -0
  122. package/lib/exercises/math/python/sequences/pySequenceFirstTermsListInstructionCompletion.d.ts +12 -0
  123. package/lib/exercises/math/python/sequences/pySequenceFirstTermsListInstructionCompletion.d.ts.map +1 -0
  124. package/lib/exercises/math/python/sequences/pySequenceFirstTermsListInstructionCompletion.js +368 -0
  125. package/lib/exercises/math/python/sequences/pySequenceFirstTermsSumInstructionCompletion.d.ts +13 -0
  126. package/lib/exercises/math/python/sequences/pySequenceFirstTermsSumInstructionCompletion.d.ts.map +1 -0
  127. package/lib/exercises/math/python/sequences/pySequenceFirstTermsSumInstructionCompletion.js +254 -0
  128. package/lib/exercises/math/python/sequences/pySequenceProgramReading.d.ts +14 -0
  129. package/lib/exercises/math/python/sequences/pySequenceProgramReading.d.ts.map +1 -0
  130. package/lib/exercises/math/python/sequences/pySequenceProgramReading.js +365 -0
  131. package/lib/exercises/math/python/sequences/pySequenceTermForLoopInstructionCompletion.d.ts +11 -0
  132. package/lib/exercises/math/python/sequences/pySequenceTermForLoopInstructionCompletion.d.ts.map +1 -0
  133. package/lib/exercises/math/python/sequences/pySequenceTermForLoopInstructionCompletion.js +298 -0
  134. package/lib/exercises/math/python/sequences/pySequenceTermFromFunctionCallInstructionCompletion.d.ts +12 -0
  135. package/lib/exercises/math/python/sequences/pySequenceTermFromFunctionCallInstructionCompletion.d.ts.map +1 -0
  136. package/lib/exercises/math/python/sequences/pySequenceTermFromFunctionCallInstructionCompletion.js +408 -0
  137. package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.d.ts +17 -0
  138. package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.d.ts.map +1 -0
  139. package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.js +498 -0
  140. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.d.ts +12 -0
  141. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.d.ts.map +1 -0
  142. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.js +191 -0
  143. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.d.ts +14 -0
  144. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.d.ts.map +1 -0
  145. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.js +153 -0
  146. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts +15 -0
  147. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -0
  148. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +184 -0
  149. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRecurrenceFormulaFromSituation.d.ts +14 -0
  150. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRecurrenceFormulaFromSituation.d.ts.map +1 -0
  151. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRecurrenceFormulaFromSituation.js +210 -0
  152. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindTermFromSituation.d.ts +15 -0
  153. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindTermFromSituation.d.ts.map +1 -0
  154. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindTermFromSituation.js +161 -0
  155. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts +17 -0
  156. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts.map +1 -0
  157. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.js +188 -0
  158. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts +6 -0
  159. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts.map +1 -0
  160. package/lib/exercises/math/sequences/arithmetic/situations/index.js +5 -0
  161. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts +15 -0
  162. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts.map +1 -0
  163. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.js +233 -0
  164. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticFirstTermsSum.d.ts +13 -0
  165. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticFirstTermsSum.d.ts.map +1 -0
  166. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticFirstTermsSum.js +111 -0
  167. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticFirstTermsSumThreshold.d.ts +13 -0
  168. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticFirstTermsSumThreshold.d.ts.map +1 -0
  169. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticFirstTermsSumThreshold.js +216 -0
  170. package/lib/exercises/math/sequences/arithmetic/sum/firstIntegersSum.d.ts +7 -0
  171. package/lib/exercises/math/sequences/arithmetic/sum/firstIntegersSum.d.ts.map +1 -0
  172. package/lib/exercises/math/sequences/arithmetic/sum/firstIntegersSum.js +94 -0
  173. package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts +5 -0
  174. package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts.map +1 -0
  175. package/lib/exercises/math/sequences/arithmetic/sum/index.js +4 -0
  176. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.d.ts +14 -0
  177. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.d.ts.map +1 -0
  178. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.js +301 -0
  179. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.d.ts +15 -0
  180. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.d.ts.map +1 -0
  181. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.js +260 -0
  182. package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.d.ts +14 -0
  183. package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.d.ts.map +1 -0
  184. package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.js +186 -0
  185. package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.d.ts +15 -0
  186. package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.d.ts.map +1 -0
  187. package/lib/exercises/math/sequences/geometric/situations/geometricFindRankFromSituation.js +142 -0
  188. package/lib/exercises/math/sequences/geometric/situations/geometricFindRecurrenceFormulaFromSituation.d.ts +14 -0
  189. package/lib/exercises/math/sequences/geometric/situations/geometricFindRecurrenceFormulaFromSituation.d.ts.map +1 -0
  190. package/lib/exercises/math/sequences/geometric/situations/geometricFindRecurrenceFormulaFromSituation.js +205 -0
  191. package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.d.ts +15 -0
  192. package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.d.ts.map +1 -0
  193. package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.js +208 -0
  194. package/lib/exercises/math/sequences/geometric/situations/geometricFindThresholdFromSituation.d.ts +17 -0
  195. package/lib/exercises/math/sequences/geometric/situations/geometricFindThresholdFromSituation.d.ts.map +1 -0
  196. package/lib/exercises/math/sequences/geometric/situations/geometricFindThresholdFromSituation.js +152 -0
  197. package/lib/exercises/math/sequences/geometric/situations/index.d.ts +4 -0
  198. package/lib/exercises/math/sequences/geometric/situations/index.d.ts.map +1 -0
  199. package/lib/exercises/math/sequences/geometric/situations/index.js +5 -0
  200. package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.d.ts +15 -0
  201. package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.d.ts.map +1 -0
  202. package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.js +248 -0
  203. package/lib/exercises/math/sequences/geometric/sum/geometricFirstTermsGeneralSum.d.ts +14 -0
  204. package/lib/exercises/math/sequences/geometric/sum/geometricFirstTermsGeneralSum.d.ts.map +1 -0
  205. package/lib/exercises/math/sequences/geometric/sum/geometricFirstTermsGeneralSum.js +126 -0
  206. package/lib/exercises/math/sequences/geometric/sum/geometricFirstTermsSum.d.ts +8 -0
  207. package/lib/exercises/math/sequences/geometric/sum/geometricFirstTermsSum.d.ts.map +1 -0
  208. package/lib/exercises/math/sequences/geometric/sum/geometricFirstTermsSum.js +91 -0
  209. package/lib/exercises/math/sequences/geometric/sum/index.d.ts +4 -0
  210. package/lib/exercises/math/sequences/geometric/sum/index.d.ts.map +1 -0
  211. package/lib/exercises/math/sequences/geometric/sum/index.js +3 -0
  212. package/lib/exercises/math/sequences/seqArithmGeom/index.d.ts +2 -0
  213. package/lib/exercises/math/sequences/seqArithmGeom/index.d.ts.map +1 -0
  214. package/lib/exercises/math/sequences/seqArithmGeom/index.js +1 -0
  215. package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.d.ts +14 -0
  216. package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.d.ts.map +1 -0
  217. package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.js +202 -0
  218. package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.d.ts.map +1 -1
  219. package/lib/exercises/math/trigonometry/circle/placeAssociateAngleOnCircle.js +0 -2
  220. package/lib/exercises/options/optionFirstTermRankOne.d.ts +16 -0
  221. package/lib/exercises/options/optionFirstTermRankOne.d.ts.map +1 -0
  222. package/lib/exercises/options/optionFirstTermRankOne.js +17 -0
  223. package/lib/exercises/options/optionIsUsePythonDef.d.ts +16 -0
  224. package/lib/exercises/options/optionIsUsePythonDef.d.ts.map +1 -0
  225. package/lib/exercises/options/optionIsUsePythonDef.js +17 -0
  226. package/lib/exercises/options/optionIsWithSuperfluousData.d.ts +16 -0
  227. package/lib/exercises/options/optionIsWithSuperfluousData.d.ts.map +1 -0
  228. package/lib/exercises/options/optionIsWithSuperfluousData.js +17 -0
  229. package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts +1 -0
  230. package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts.map +1 -1
  231. package/lib/exercises/vea/colinearVectorVEA.d.ts +2 -0
  232. package/lib/exercises/vea/colinearVectorVEA.d.ts.map +1 -0
  233. package/lib/exercises/vea/colinearVectorVEA.js +11 -0
  234. package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
  235. package/lib/exercises/vea/rationalVEA.js +7 -3
  236. package/lib/exercises/vea/varLineVEA.d.ts.map +1 -1
  237. package/lib/exercises/vea/varLineVEA.js +7 -3
  238. package/lib/exercises/vea/varSignTableVEA.d.ts +8 -0
  239. package/lib/exercises/vea/varSignTableVEA.d.ts.map +1 -1
  240. package/lib/exercises/vea/varSignTableVEA.js +8 -0
  241. package/lib/exercises/vea/xTableLineVEA.d.ts +1 -0
  242. package/lib/exercises/vea/xTableLineVEA.d.ts.map +1 -1
  243. package/lib/exercises/vea/xTableLineVEA.js +1 -0
  244. package/lib/index.d.ts +104 -5
  245. package/lib/index.d.ts.map +1 -1
  246. package/lib/latexTester.d.ts.map +1 -1
  247. package/lib/latexTester.js +3 -1
  248. package/lib/math/geometry/angle.d.ts +2 -0
  249. package/lib/math/geometry/angle.d.ts.map +1 -1
  250. package/lib/math/geometry/angle.js +17 -0
  251. package/lib/math/geometry/line.d.ts +1 -1
  252. package/lib/math/geometry/line.d.ts.map +1 -1
  253. package/lib/math/geometry/line.js +3 -3
  254. package/lib/math/geometry/point.d.ts +1 -1
  255. package/lib/math/geometry/point.d.ts.map +1 -1
  256. package/lib/math/geometry/point.js +4 -1
  257. package/lib/math/geometry/segment.js +1 -1
  258. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  259. package/lib/math/numbers/reals/real.js +4 -0
  260. package/lib/math/probability/randomVariable.d.ts +2 -1
  261. package/lib/math/probability/randomVariable.d.ts.map +1 -1
  262. package/lib/math/probability/randomVariable.js +7 -1
  263. package/lib/math/utils/arithmetic/primeFactors.d.ts +1 -1
  264. package/lib/math/utils/arithmetic/primeFactors.d.ts.map +1 -1
  265. package/lib/math/utils/arithmetic/primeFactors.js +23 -9
  266. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts +53 -0
  267. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -0
  268. package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +1928 -0
  269. package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts +15 -0
  270. package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -0
  271. package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +136 -0
  272. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +42 -0
  273. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -0
  274. package/lib/math/utils/sequences/situations/seqGeometricSituations.js +932 -0
  275. package/lib/math/utils/sequences/situations/seqGeometricUtils.d.ts +12 -0
  276. package/lib/math/utils/sequences/situations/seqGeometricUtils.d.ts.map +1 -0
  277. package/lib/math/utils/sequences/situations/seqGeometricUtils.js +90 -0
  278. package/lib/tests/pdfs/mdTableToLatexTabular.js +1 -1
  279. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  280. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  281. package/lib/tree/nodes/complex/complexNode.d.ts +1 -0
  282. package/lib/tree/nodes/complex/complexNode.d.ts.map +1 -1
  283. package/lib/tree/nodes/complex/complexNode.js +3 -0
  284. package/lib/tree/nodes/equations/equalNode.d.ts +1 -0
  285. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  286. package/lib/tree/nodes/equations/equalNode.js +3 -0
  287. package/lib/tree/nodes/equations/equationSolutionNode.d.ts +1 -0
  288. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  289. package/lib/tree/nodes/equations/equationSolutionNode.js +3 -0
  290. package/lib/tree/nodes/equations/multiEqualNode.d.ts +1 -0
  291. package/lib/tree/nodes/equations/multiEqualNode.d.ts.map +1 -1
  292. package/lib/tree/nodes/equations/multiEqualNode.js +3 -0
  293. package/lib/tree/nodes/equations/notEqualNode.d.ts +1 -0
  294. package/lib/tree/nodes/equations/notEqualNode.d.ts.map +1 -1
  295. package/lib/tree/nodes/equations/notEqualNode.js +3 -0
  296. package/lib/tree/nodes/functions/absNode.d.ts +1 -0
  297. package/lib/tree/nodes/functions/absNode.d.ts.map +1 -1
  298. package/lib/tree/nodes/functions/absNode.js +7 -0
  299. package/lib/tree/nodes/functions/arcSinNode.d.ts +1 -0
  300. package/lib/tree/nodes/functions/arcSinNode.d.ts.map +1 -1
  301. package/lib/tree/nodes/functions/arcSinNode.js +7 -0
  302. package/lib/tree/nodes/functions/arccosNode.d.ts +1 -0
  303. package/lib/tree/nodes/functions/arccosNode.d.ts.map +1 -1
  304. package/lib/tree/nodes/functions/arccosNode.js +7 -0
  305. package/lib/tree/nodes/functions/arctanNode.d.ts +1 -0
  306. package/lib/tree/nodes/functions/arctanNode.d.ts.map +1 -1
  307. package/lib/tree/nodes/functions/arctanNode.js +7 -0
  308. package/lib/tree/nodes/functions/cosNode.d.ts +1 -0
  309. package/lib/tree/nodes/functions/cosNode.d.ts.map +1 -1
  310. package/lib/tree/nodes/functions/cosNode.js +7 -0
  311. package/lib/tree/nodes/functions/expNode.d.ts +1 -0
  312. package/lib/tree/nodes/functions/expNode.d.ts.map +1 -1
  313. package/lib/tree/nodes/functions/expNode.js +7 -0
  314. package/lib/tree/nodes/functions/factorialNode.d.ts +30 -0
  315. package/lib/tree/nodes/functions/factorialNode.d.ts.map +1 -0
  316. package/lib/tree/nodes/functions/factorialNode.js +79 -0
  317. package/lib/tree/nodes/functions/functionNode.d.ts +2 -1
  318. package/lib/tree/nodes/functions/functionNode.d.ts.map +1 -1
  319. package/lib/tree/nodes/functions/functionNode.js +1 -0
  320. package/lib/tree/nodes/functions/integralNode.d.ts +1 -0
  321. package/lib/tree/nodes/functions/integralNode.d.ts.map +1 -1
  322. package/lib/tree/nodes/functions/integralNode.js +7 -0
  323. package/lib/tree/nodes/functions/log10Node.d.ts +1 -0
  324. package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
  325. package/lib/tree/nodes/functions/log10Node.js +7 -0
  326. package/lib/tree/nodes/functions/logNode.d.ts +1 -0
  327. package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
  328. package/lib/tree/nodes/functions/logNode.js +9 -0
  329. package/lib/tree/nodes/functions/oppositeNode.d.ts +1 -0
  330. package/lib/tree/nodes/functions/oppositeNode.d.ts.map +1 -1
  331. package/lib/tree/nodes/functions/oppositeNode.js +7 -0
  332. package/lib/tree/nodes/functions/sinNode.d.ts +1 -0
  333. package/lib/tree/nodes/functions/sinNode.d.ts.map +1 -1
  334. package/lib/tree/nodes/functions/sinNode.js +7 -0
  335. package/lib/tree/nodes/functions/sqrtNode.d.ts +1 -0
  336. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  337. package/lib/tree/nodes/functions/sqrtNode.js +7 -0
  338. package/lib/tree/nodes/functions/tanNode.d.ts +1 -0
  339. package/lib/tree/nodes/functions/tanNode.d.ts.map +1 -1
  340. package/lib/tree/nodes/functions/tanNode.js +7 -0
  341. package/lib/tree/nodes/geometry/degree.d.ts +1 -0
  342. package/lib/tree/nodes/geometry/degree.d.ts.map +1 -1
  343. package/lib/tree/nodes/geometry/degree.js +7 -0
  344. package/lib/tree/nodes/geometry/lengthNode.d.ts +1 -0
  345. package/lib/tree/nodes/geometry/lengthNode.d.ts.map +1 -1
  346. package/lib/tree/nodes/geometry/lengthNode.js +7 -0
  347. package/lib/tree/nodes/geometry/pointNode.d.ts +1 -0
  348. package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
  349. package/lib/tree/nodes/geometry/pointNode.js +7 -0
  350. package/lib/tree/nodes/geometry/vectorNode.d.ts +1 -0
  351. package/lib/tree/nodes/geometry/vectorNode.d.ts.map +1 -1
  352. package/lib/tree/nodes/geometry/vectorNode.js +7 -0
  353. package/lib/tree/nodes/inequations/inequationNode.d.ts +1 -0
  354. package/lib/tree/nodes/inequations/inequationNode.d.ts.map +1 -1
  355. package/lib/tree/nodes/inequations/inequationNode.js +7 -0
  356. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +1 -0
  357. package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
  358. package/lib/tree/nodes/inequations/inequationSolutionNode.js +7 -0
  359. package/lib/tree/nodes/node.d.ts +2 -1
  360. package/lib/tree/nodes/node.d.ts.map +1 -1
  361. package/lib/tree/nodes/node.js +2 -0
  362. package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
  363. package/lib/tree/nodes/nodeConstructor.js +4 -0
  364. package/lib/tree/nodes/numbers/percentNode.d.ts +1 -0
  365. package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
  366. package/lib/tree/nodes/numbers/percentNode.js +7 -0
  367. package/lib/tree/nodes/operators/addNode.d.ts +1 -0
  368. package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
  369. package/lib/tree/nodes/operators/addNode.js +7 -0
  370. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +4 -3
  371. package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -1
  372. package/lib/tree/nodes/operators/binomialCoefficientNode.js +24 -5
  373. package/lib/tree/nodes/operators/divideNode.d.ts +1 -0
  374. package/lib/tree/nodes/operators/divideNode.d.ts.map +1 -1
  375. package/lib/tree/nodes/operators/divideNode.js +7 -0
  376. package/lib/tree/nodes/operators/fractionNode.d.ts +1 -0
  377. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  378. package/lib/tree/nodes/operators/fractionNode.js +7 -0
  379. package/lib/tree/nodes/operators/limitNode.d.ts +1 -0
  380. package/lib/tree/nodes/operators/limitNode.d.ts.map +1 -1
  381. package/lib/tree/nodes/operators/limitNode.js +7 -0
  382. package/lib/tree/nodes/operators/multiplyNode.d.ts +1 -0
  383. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  384. package/lib/tree/nodes/operators/multiplyNode.js +7 -0
  385. package/lib/tree/nodes/operators/powerNode.d.ts +1 -0
  386. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  387. package/lib/tree/nodes/operators/powerNode.js +7 -0
  388. package/lib/tree/nodes/operators/substractNode.d.ts +1 -0
  389. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  390. package/lib/tree/nodes/operators/substractNode.js +7 -0
  391. package/lib/tree/nodes/polynomials/monomNode.d.ts +1 -0
  392. package/lib/tree/nodes/polynomials/monomNode.d.ts.map +1 -1
  393. package/lib/tree/nodes/polynomials/monomNode.js +7 -0
  394. package/lib/tree/nodes/polynomials/trinomNode.d.ts +1 -0
  395. package/lib/tree/nodes/polynomials/trinomNode.d.ts.map +1 -1
  396. package/lib/tree/nodes/polynomials/trinomNode.js +7 -0
  397. package/lib/tree/nodes/sets/belongsNode.d.ts +1 -0
  398. package/lib/tree/nodes/sets/belongsNode.d.ts.map +1 -1
  399. package/lib/tree/nodes/sets/belongsNode.js +7 -0
  400. package/lib/tree/nodes/sets/discreteSetNode.d.ts +1 -0
  401. package/lib/tree/nodes/sets/discreteSetNode.d.ts.map +1 -1
  402. package/lib/tree/nodes/sets/discreteSetNode.js +7 -0
  403. package/lib/tree/nodes/sets/intervalNode.d.ts +1 -0
  404. package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
  405. package/lib/tree/nodes/sets/intervalNode.js +7 -0
  406. package/lib/tree/nodes/sets/unionIntervalNode.d.ts +1 -0
  407. package/lib/tree/nodes/sets/unionIntervalNode.d.ts.map +1 -1
  408. package/lib/tree/nodes/sets/unionIntervalNode.js +7 -0
  409. package/lib/tree/nodes/variables/variableNode.d.ts +1 -0
  410. package/lib/tree/nodes/variables/variableNode.d.ts.map +1 -1
  411. package/lib/tree/nodes/variables/variableNode.js +7 -0
  412. package/lib/tree/parsers/vectorParser.d.ts.map +1 -1
  413. package/lib/tree/parsers/vectorParser.js +8 -0
  414. package/lib/tree/utilities/nodeShuffler.d.ts.map +1 -1
  415. package/lib/tree/utilities/nodeShuffler.js +3 -0
  416. package/lib/tree/utilities/nodeSimplifier.d.ts.map +1 -1
  417. package/lib/tree/utilities/nodeSimplifier.js +3 -0
  418. package/package.json +1 -1
@@ -0,0 +1,205 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getOptionFirstTermRankOneStuff, } from "../../../../../exercises/options/optionFirstTermRankOne.js";
3
+ import { getOptionIsWithSuperfluousData, } from "../../../../../exercises/options/optionIsWithSuperfluousData.js";
4
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
5
+ import { nodeBySubstitutingVar } from "../../../../../math/utils/functions/functionComposition.js";
6
+ import { randint } from "../../../../../math/utils/random/randint.js";
7
+ import { situationsGeometric, } from "../../../../../math/utils/sequences/situations/seqGeometricSituations.js";
8
+ import { EqualNode, isEqualNode, } from "../../../../../tree/nodes/equations/equalNode.js";
9
+ import { add } from "../../../../../tree/nodes/operators/addNode.js";
10
+ import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
11
+ import { power } from "../../../../../tree/nodes/operators/powerNode.js";
12
+ import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
13
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
14
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
15
+ const _getNodeFactor = (firstRank, varName = "n") => {
16
+ const nodeN = varName.toTree();
17
+ return firstRank === 0 ? nodeN : substract(nodeN, 1);
18
+ };
19
+ const situations = situationsGeometric;
20
+ const getInstruction = (identifiers, optsIn) => {
21
+ const opts = optsIn ?? optsDefault;
22
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
23
+ const { situationIndex, initial, reason, superfluousData } = identifiers;
24
+ const situation = situations[situationIndex];
25
+ return `${situation.getStrSituation(initial, reason, firstRank, superfluousData)}
26
+
27
+ Donner la relation de récurrence pour la suite $(u_n)$.`;
28
+ };
29
+ const getAnswerNode = (identifiers, opts) => {
30
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
31
+ const { situationIndex, initial, reason } = identifiers;
32
+ const situation = situations[situationIndex];
33
+ return situation.variationFindRecurrenceFormula.getAnswerNode(initial, reason, firstRank);
34
+ };
35
+ const getAnswer = (identifiers, optsIn) => {
36
+ const opts = optsIn ?? optsDefault;
37
+ return getAnswerNode(identifiers, opts).toTex();
38
+ };
39
+ const getHint = (identifiers, optsIn) => {
40
+ const opts = optsIn ?? optsDefault;
41
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
42
+ const { situationIndex } = identifiers;
43
+ const situation = situations[situationIndex];
44
+ return situation.variationFindRecurrenceFormula.getHint(firstRank);
45
+ };
46
+ const getCorrection = (identifiers, optsIn) => {
47
+ const opts = optsIn ?? optsDefault;
48
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
49
+ const { situationIndex, initial, reason } = identifiers;
50
+ const situation = situations[situationIndex];
51
+ return situation.variationFindRecurrenceFormula.getCorrectionStuff(initial, reason, firstRank).str;
52
+ };
53
+ const getPropositions = (n, { answer, ...identifiers }, optsIn) => {
54
+ const opts = optsIn ?? optsDefault;
55
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
56
+ const { situationIndex, initial, reason } = identifiers;
57
+ const situation = situations[situationIndex];
58
+ const propositions = [];
59
+ addValidProp(propositions, answer);
60
+ //most to least probable mistakes:
61
+ //student: geometric -> arithmetic: u_{n+1} = u_n + reason
62
+ {
63
+ tryToAddWrongProp(propositions, new EqualNode("u_{n+1}".toTree(), add("u_{n}".toTree(), reason)).toTex());
64
+ }
65
+ //student: reason -> initial: u_{n+1} = u_n * initial
66
+ {
67
+ tryToAddWrongProp(propositions, new EqualNode("u_{n+1}".toTree(), multiply("u_{n}".toTree(), initial)).toTex());
68
+ }
69
+ //student: u_{n+1} = u_n * n ^ reason
70
+ {
71
+ tryToAddWrongProp(propositions, new EqualNode("u_{n+1}".toTree(), multiply("u_{n}".toTree(), power("n".toTree(), reason))).toTex());
72
+ }
73
+ //student: mixes explicit with recurrence: u_{n+1} = initial + u_n * reason
74
+ {
75
+ const nodeExplicitFormula = situation.variationFindExplicitFormula.getAnswerNode(initial, reason, firstRank);
76
+ const nodeWrong1 = nodeBySubstitutingVar(nodeExplicitFormula, "u_{n+1}".toTree(), "u_n".toTree());
77
+ const nodeWrong2 = nodeBySubstitutingVar(nodeWrong1, "u_{n}".toTree(), "n".toTree());
78
+ const strWrong2 = nodeWrong2.simplify().toTex();
79
+ tryToAddWrongProp(propositions, strWrong2);
80
+ }
81
+ //student: explicit formula
82
+ {
83
+ tryToAddWrongProp(propositions, situation.variationFindExplicitFormula
84
+ .getAnswerNode(initial, reason, firstRank)
85
+ .toTex());
86
+ }
87
+ //student: explicit formula for u_{n+1}
88
+ {
89
+ const nodeFormula = multiply(initial, power(reason, substract(add("n".toTree(), 1), firstRank).simplify())).simplify();
90
+ const equalNode = new EqualNode("u_{n+1}".toTree(), nodeFormula);
91
+ tryToAddWrongProp(propositions, equalNode.toTex());
92
+ }
93
+ return shuffleProps(propositions, n);
94
+ };
95
+ const isAnswerValid = (ans, { answer, ..._identifiers }, _optsIn) => {
96
+ try {
97
+ if (!ans.includes("=")) {
98
+ return false;
99
+ }
100
+ //TODO faire fonctionner parseAlgebraic("u_n = 3 \\times 2^n") (token _ not implemented)
101
+ // const nodeAns = parseAlgebraic(ans);
102
+ function workaroundParser(strSrc) {
103
+ function workaroundReplacer(strSrc) {
104
+ const dictFromTo = {
105
+ u_n: "x",
106
+ "u_{n+1}": "y",
107
+ };
108
+ return Object.entries(dictFromTo).reduce((acc, [strFrom, strTo]) => {
109
+ return acc.replaceAll(strFrom, strTo);
110
+ }, strSrc);
111
+ }
112
+ const [lhs, rhs] = strSrc.split("=");
113
+ const [lhsRefined, rhsRefined] = [lhs, rhs].map(workaroundReplacer);
114
+ const [nodeLhs, nodeRhs] = [lhsRefined, rhsRefined].map((str) => parseAlgebraic(str));
115
+ return new EqualNode(nodeLhs, nodeRhs);
116
+ }
117
+ const nodeAns = workaroundParser(ans);
118
+ if (!isEqualNode(nodeAns)) {
119
+ return false;
120
+ }
121
+ // const nodeAnswer = getAnswerNode(identifiers, opts) as EqualNode;
122
+ const nodeAnswer = workaroundParser(answer);
123
+ const isValidLhs = () => {
124
+ // return (
125
+ // substract(nodeAns.leftChild, nodeAnswer.leftChild)
126
+ // .simplify()
127
+ // .evaluate() === 0
128
+ // );
129
+ return [1, 10, 100].every((y) => {
130
+ return (substract(nodeAns.leftChild, nodeAnswer.leftChild).evaluate({
131
+ y,
132
+ }) === 0);
133
+ });
134
+ };
135
+ const isValidRhs = () => {
136
+ // return (
137
+ // substract(nodeAns.rightChild, nodeAnswer.rightChild)
138
+ // .simplify()
139
+ // .evaluate() === 0
140
+ // );
141
+ return [1, 10, 100].every((x) => {
142
+ return (substract(nodeAns.rightChild, nodeAnswer.rightChild).evaluate({
143
+ x,
144
+ }) === 0);
145
+ });
146
+ };
147
+ return isValidLhs() && isValidRhs();
148
+ }
149
+ catch (e) {
150
+ return handleVEAError(e);
151
+ }
152
+ };
153
+ const getGeometricFindRecurrenceFormulaFromSituationQuestion = (optsIn) => {
154
+ const opts = optsIn ?? optsDefault;
155
+ // const firstRank = opts?.firstTermRankOne ? 1 : 0;
156
+ const situationIndex = randint(0, situations.length);
157
+ const situation = situations[situationIndex];
158
+ const initial = situation.randInitial();
159
+ const reason = situation.randReason();
160
+ const superfluousData = opts.isWithSuperfluousData
161
+ ? situation.randSuperfluousData()
162
+ : undefined;
163
+ const identifiers = {
164
+ situationIndex,
165
+ initial,
166
+ reason,
167
+ superfluousData,
168
+ };
169
+ return getQuestionFromIdentifiers(identifiers, opts);
170
+ };
171
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
172
+ const question = {
173
+ answer: getAnswer(identifiers, opts),
174
+ instruction: getInstruction(identifiers, opts),
175
+ keys: ["un", "equal", "n", "unplus1"],
176
+ answerFormat: "tex",
177
+ identifiers,
178
+ hint: getHint(identifiers, opts),
179
+ correction: getCorrection(identifiers, opts),
180
+ options: opts,
181
+ };
182
+ return question;
183
+ };
184
+ const optionsStuffFirstTermRankOne = getOptionFirstTermRankOneStuff(false);
185
+ const optionsStuffIsWithSuperfluousData = getOptionIsWithSuperfluousData(false);
186
+ const optsDefault = Object.assign({}, optionsStuffFirstTermRankOne.optsDefaultFirstTermRankOne, optionsStuffIsWithSuperfluousData.optsDefaultIsWithSuperfluousData);
187
+ const options = [
188
+ optionsStuffFirstTermRankOne.generatorOptionFirstTermRankOne,
189
+ optionsStuffIsWithSuperfluousData.generatorOptionIsWithSuperfluousData,
190
+ ];
191
+ export const geometricFindRecurrenceFormulaFromSituation = {
192
+ id: "geometricFindRecurrenceFormulaFromSituation",
193
+ connector: "=",
194
+ label: "À partir d'une situation décrivant une évolution géométrique, exprimer la relation de récurrence",
195
+ isSingleStep: true,
196
+ generator: (nb, opts) => getDistinctQuestions(() => getGeometricFindRecurrenceFormulaFromSituationQuestion(opts), nb),
197
+ options,
198
+ qcmTimer: 60,
199
+ freeTimer: 60,
200
+ getPropositions,
201
+ isAnswerValid,
202
+ subject: "Mathématiques",
203
+ getQuestionFromIdentifiers,
204
+ hasHintAndCorrection: true,
205
+ };
@@ -0,0 +1,15 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ import { OptionFirstTermRankOne } from "../../../../../exercises/options/optionFirstTermRankOne.js";
3
+ import { OptionIsWithSuperfluousData } from "../../../../../exercises/options/optionIsWithSuperfluousData.js";
4
+ import { SituationGeometricSuperfluousData } from "../../../../../math/utils/sequences/situations/seqGeometricSituations.js";
5
+ type Identifiers = {
6
+ situationIndex: number;
7
+ initial: number;
8
+ reason: number;
9
+ superfluousData?: SituationGeometricSuperfluousData;
10
+ rankAsked: number;
11
+ };
12
+ type Options = OptionFirstTermRankOne & OptionIsWithSuperfluousData;
13
+ export declare const geometricFindTermFromSituation: Exercise<Identifiers, Options>;
14
+ export {};
15
+ //# sourceMappingURL=geometricFindTermFromSituation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometricFindTermFromSituation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,wDAAwD,CAAC;AAKhE,OAAO,EAEL,iCAAiC,EAElC,MAAM,iEAAiE,CAAC;AAazE,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA2OF,KAAK,OAAO,GAAG,sBAAsB,GAAG,2BAA2B,CAAC;AAcpE,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAmBzE,CAAC"}
@@ -0,0 +1,208 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../../exercises/exercise.js";
2
+ import { getOptionFirstTermRankOneStuff, } from "../../../../../exercises/options/optionFirstTermRankOne.js";
3
+ import { getOptionIsWithSuperfluousData, } from "../../../../../exercises/options/optionIsWithSuperfluousData.js";
4
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
5
+ import { isEquivalentNodes } from "../../../../../math/utils/functions/functionComparison.js";
6
+ import { randint } from "../../../../../math/utils/random/randint.js";
7
+ import { round } from "../../../../../math/utils/round.js";
8
+ import { situationsGeometric, } from "../../../../../math/utils/sequences/situations/seqGeometricSituations.js";
9
+ import { add } from "../../../../../tree/nodes/operators/addNode.js";
10
+ import { multiply } from "../../../../../tree/nodes/operators/multiplyNode.js";
11
+ import { power } from "../../../../../tree/nodes/operators/powerNode.js";
12
+ import { substract } from "../../../../../tree/nodes/operators/substractNode.js";
13
+ import { parseAlgebraic } from "../../../../../tree/parsers/latexParser.js";
14
+ import { coinFlip } from "../../../../../utils/alea/coinFlip.js";
15
+ const _getNodeFactor = (firstRank, varName = "n") => {
16
+ const nodeN = varName.toTree();
17
+ return firstRank === 0 ? nodeN : substract(nodeN, 1);
18
+ };
19
+ const situations = situationsGeometric;
20
+ const getInstruction = (identifiers, optsIn) => {
21
+ const opts = optsIn ?? optsDefault;
22
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
23
+ const { situationIndex, initial, reason, superfluousData, rankAsked } = identifiers;
24
+ const situation = situations[situationIndex];
25
+ return `${situation.getStrSituation(initial, reason, firstRank, superfluousData)}
26
+
27
+ Que vaut $u_{${rankAsked}}$ ?`;
28
+ };
29
+ const getAnswerNode = (identifiers, opts) => {
30
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
31
+ const { situationIndex, initial, reason, rankAsked } = identifiers;
32
+ const situation = situations[situationIndex];
33
+ return situation.variationFindRandomTerm.getAnswerNode(initial, reason, firstRank, rankAsked);
34
+ };
35
+ const getAnswer = (identifiers, optsIn) => {
36
+ const opts = optsIn ?? optsDefault;
37
+ return getAnswerNode(identifiers, opts).simplify().toTex();
38
+ };
39
+ const getHint = (identifiers, optsIn) => {
40
+ const opts = optsIn ?? optsDefault;
41
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
42
+ const { situationIndex, rankAsked } = identifiers;
43
+ const situation = situations[situationIndex];
44
+ return situation.variationFindRandomTerm.getHint(firstRank, rankAsked);
45
+ };
46
+ const getCorrection = (identifiers, optsIn) => {
47
+ const opts = optsIn ?? optsDefault;
48
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
49
+ const { situationIndex, initial, reason, rankAsked } = identifiers;
50
+ const situation = situations[situationIndex];
51
+ return situation.variationFindRandomTerm.getCorrectionStuff(initial, reason, firstRank, rankAsked).str;
52
+ };
53
+ const getPropositions = (n, { answer, ...identifiers }, optsIn) => {
54
+ const opts = optsIn ?? optsDefault;
55
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
56
+ const { situationIndex, initial, reason, rankAsked } = identifiers;
57
+ const situation = situations[situationIndex];
58
+ const propositions = [];
59
+ addValidProp(propositions, answer);
60
+ //student: type-specific mistake
61
+ {
62
+ const { situationIndex } = identifiers;
63
+ const situation = situations[situationIndex];
64
+ switch (situation.type) {
65
+ case "factor":
66
+ {
67
+ (() => { })();
68
+ }
69
+ break;
70
+ case "factorPercentage":
71
+ {
72
+ (() => { })();
73
+ }
74
+ break;
75
+ case "evo":
76
+ {
77
+ (() => { })();
78
+ }
79
+ break;
80
+ case "evoPercentage":
81
+ {
82
+ const evoPercentage = round((reason - 1) * 100, 2);
83
+ //student: reason = evoPercentage
84
+ {
85
+ const identifiersWrong = { ...identifiers, reason: evoPercentage };
86
+ tryToAddWrongProp(propositions, getAnswer(identifiersWrong, opts));
87
+ }
88
+ //student: reason = 100 + evoPercentage
89
+ {
90
+ const identifiersWrong = {
91
+ ...identifiers,
92
+ reason: 100 + evoPercentage,
93
+ };
94
+ tryToAddWrongProp(propositions, getAnswer(identifiersWrong, opts));
95
+ }
96
+ }
97
+ break;
98
+ }
99
+ }
100
+ //student: geometric -> arithmetic
101
+ {
102
+ const nodeWrong = add(initial, multiply(reason, substract(rankAsked, firstRank))).simplify();
103
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
104
+ }
105
+ if (coinFlip()) {
106
+ if (coinFlip()) {
107
+ //student: rankAsked - 1
108
+ {
109
+ const nodeWrong = situation.variationFindRandomTerm
110
+ .getAnswerNode(reason, initial, firstRank, rankAsked - 1)
111
+ .simplify();
112
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
113
+ }
114
+ }
115
+ else {
116
+ //student: rankAsked + 1
117
+ {
118
+ const nodeWrong = situation.variationFindRandomTerm
119
+ .getAnswerNode(reason, initial, firstRank, rankAsked + 1)
120
+ .simplify();
121
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
122
+ }
123
+ }
124
+ }
125
+ //student: swaps(initial, reason)
126
+ {
127
+ const nodeWrong = situation.variationFindRandomTerm
128
+ .getAnswerNode(reason, initial, firstRank, rankAsked)
129
+ .simplify();
130
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
131
+ }
132
+ //student: u_n = (initial ^ reason) * n
133
+ {
134
+ const nodeWrong = multiply(power(initial, reason), substract(rankAsked, firstRank)).simplify();
135
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
136
+ }
137
+ //student: u_n = (initial * reason) ^ n
138
+ {
139
+ const nodeWrong = power(multiply(initial, reason), substract(rankAsked, firstRank)).simplify();
140
+ tryToAddWrongProp(propositions, nodeWrong.toTex());
141
+ }
142
+ return shuffleProps(propositions, n);
143
+ };
144
+ const isAnswerValid = (ans, { answer }) => {
145
+ if (ans === answer) {
146
+ return true;
147
+ }
148
+ else {
149
+ const nodeAns = parseAlgebraic(ans);
150
+ const nodeAnswer = parseAlgebraic(answer);
151
+ return isEquivalentNodes(nodeAns, nodeAnswer);
152
+ }
153
+ };
154
+ const getGeometricFindTermFromSituationQuestion = (optsIn) => {
155
+ const opts = optsIn ?? optsDefault;
156
+ const { isWithSuperfluousData } = opts;
157
+ const situationIndex = randint(0, situations.length);
158
+ const situation = situations[situationIndex];
159
+ const initial = situation.randInitial();
160
+ const reason = situation.randReason();
161
+ const superfluousData = isWithSuperfluousData
162
+ ? situation.randSuperfluousData()
163
+ : undefined;
164
+ const rankAsked = randint(4, 15);
165
+ const identifiers = {
166
+ situationIndex,
167
+ initial,
168
+ reason,
169
+ superfluousData,
170
+ rankAsked,
171
+ };
172
+ return getQuestionFromIdentifiers(identifiers, opts);
173
+ };
174
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
175
+ const question = {
176
+ answer: getAnswer(identifiers, opts),
177
+ instruction: getInstruction(identifiers, opts),
178
+ keys: [],
179
+ answerFormat: "tex",
180
+ identifiers,
181
+ hint: getHint(identifiers, opts),
182
+ correction: getCorrection(identifiers, opts),
183
+ options: opts,
184
+ };
185
+ return question;
186
+ };
187
+ const optionsStuffFirstTermRankOne = getOptionFirstTermRankOneStuff(false);
188
+ const optionsStuffIsWithSuperfluousData = getOptionIsWithSuperfluousData(false);
189
+ const optsDefault = Object.assign({}, optionsStuffFirstTermRankOne.optsDefaultFirstTermRankOne, optionsStuffIsWithSuperfluousData.optsDefaultIsWithSuperfluousData);
190
+ const options = [
191
+ optionsStuffFirstTermRankOne.generatorOptionFirstTermRankOne,
192
+ optionsStuffIsWithSuperfluousData.generatorOptionIsWithSuperfluousData,
193
+ ];
194
+ export const geometricFindTermFromSituation = {
195
+ id: "geometricFindTermFromSituation",
196
+ connector: "=",
197
+ label: "À partir d'une situation décrivant une évolution géométrique, exprimer un terme de rang $n$ demandé",
198
+ isSingleStep: true,
199
+ generator: (nb, opts) => getDistinctQuestions(() => getGeometricFindTermFromSituationQuestion(opts), nb),
200
+ options,
201
+ qcmTimer: 60,
202
+ freeTimer: 60,
203
+ getPropositions,
204
+ isAnswerValid,
205
+ subject: "Mathématiques",
206
+ getQuestionFromIdentifiers,
207
+ hasHintAndCorrection: true,
208
+ };
@@ -0,0 +1,17 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ import { OptionFirstTermRankOne } from "../../../../../exercises/options/optionFirstTermRankOne.js";
3
+ import { OptionIsWithSuperfluousData } from "../../../../../exercises/options/optionIsWithSuperfluousData.js";
4
+ import { InegalitySymbols } from "../../../../../math/inequations/inequation.js";
5
+ import { SituationGeometricSuperfluousData } from "../../../../../math/utils/sequences/situations/seqGeometricSituations.js";
6
+ type Identifiers = {
7
+ situationIndex: number;
8
+ initial: number;
9
+ reason: number;
10
+ superfluousData?: SituationGeometricSuperfluousData;
11
+ valueThreshold: number;
12
+ inegSymbol: InegalitySymbols;
13
+ };
14
+ type Options = OptionFirstTermRankOne & OptionIsWithSuperfluousData;
15
+ export declare const geometricFindThresholdFromSituation: Exercise<Identifiers, Options>;
16
+ export {};
17
+ //# sourceMappingURL=geometricFindThresholdFromSituation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometricFindThresholdFromSituation.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/situations/geometricFindThresholdFromSituation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,wDAAwD,CAAC;AAGhE,OAAO,EACL,gBAAgB,EAGjB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAEL,iCAAiC,EAElC,MAAM,iEAAiE,CAAC;AAGzE,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,iCAAiC,CAAC;IACpD,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAqKF,KAAK,OAAO,GAAG,sBAAsB,GAAG,2BAA2B,CAAC;AAcpE,eAAO,MAAM,mCAAmC,EAAE,QAAQ,CACxD,WAAW,EACX,OAAO,CAoBR,CAAC"}
@@ -0,0 +1,152 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, } from "../../../../../exercises/exercise.js";
2
+ import { getOptionFirstTermRankOneStuff, } from "../../../../../exercises/options/optionFirstTermRankOne.js";
3
+ import { getOptionIsWithSuperfluousData, } from "../../../../../exercises/options/optionIsWithSuperfluousData.js";
4
+ import { getDistinctQuestions } from "../../../../../exercises/utils/getDistinctQuestions.js";
5
+ import { numberVEA } from "../../../../../exercises/vea/numberVEA.js";
6
+ import { InequationSymbol, InequationSymbolConstructor, } from "../../../../../math/inequations/inequation.js";
7
+ import { randint } from "../../../../../math/utils/random/randint.js";
8
+ import { situationsGeometric, } from "../../../../../math/utils/sequences/situations/seqGeometricSituations.js";
9
+ import { handleVEAError } from "../../../../../utils/errors/handleVEAError.js";
10
+ const situations = situationsGeometric;
11
+ const getInstruction = (identifiers, optsIn) => {
12
+ const opts = optsIn ?? optsDefault;
13
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
14
+ const { situationIndex, initial, reason, superfluousData, inegSymbol } = identifiers;
15
+ const situation = situations[situationIndex];
16
+ const _inequationSymbol = new InequationSymbol(inegSymbol);
17
+ return `${situation.getStrSituation(initial, reason, firstRank, superfluousData)}
18
+
19
+ situation.variationFindThreshold.getStrQuestion!(
20
+ initial,
21
+ reason,
22
+ firstRank,
23
+ valueThreshold,
24
+ inequationSymbol,
25
+ )`;
26
+ };
27
+ const getAnswerNode = (_identifiers, _opts) => {
28
+ // const firstRank = opts?.firstTermRankOne ? 1 : 0;
29
+ // const { situationIndex, initial, reason, valueThreshold, inegSymbol } =
30
+ // identifiers;
31
+ // const situation = situations[situationIndex];
32
+ // const inequationSymbol = new InequationSymbol(inegSymbol);
33
+ // return situation.variationFindThreshold.getAnswerNode(
34
+ // initial,
35
+ // reason,
36
+ // firstRank,
37
+ // valueThreshold,
38
+ // inequationSymbol,
39
+ // );
40
+ return (0).toTree();
41
+ };
42
+ const getAnswer = (identifiers, optsIn) => {
43
+ const opts = optsIn ?? optsDefault;
44
+ return getAnswerNode(identifiers, opts).simplify().toTex();
45
+ };
46
+ const getHint = (_identifiers, _optsIn) => {
47
+ // const opts = optsIn ?? optsDefault;
48
+ // const firstRank = opts?.firstTermRankOne ? 1 : 0;
49
+ // const { situationIndex, valueThreshold, inegSymbol, reason } = identifiers;
50
+ // const situation = situations[situationIndex];
51
+ // const inequationSymbol = new InequationSymbol(inegSymbol);
52
+ // return situation.variationFindThreshold.getHint(
53
+ // firstRank,
54
+ // valueThreshold,
55
+ // inequationSymbol,
56
+ // reason,
57
+ // );
58
+ return "hint";
59
+ };
60
+ const getCorrection = (_identifiers, _optsIn) => {
61
+ // const opts = optsIn ?? optsDefault;
62
+ // const firstRank = opts?.firstTermRankOne ? 1 : 0;
63
+ // const { situationIndex, initial, reason, valueThreshold, inegSymbol } =
64
+ // identifiers;
65
+ // const situation = situations[situationIndex];
66
+ // const inequationSymbol = new InequationSymbol(inegSymbol);
67
+ // return situation.variationFindThreshold.getCorrectionStuff(
68
+ // initial,
69
+ // reason,
70
+ // firstRank,
71
+ // valueThreshold,
72
+ // inequationSymbol,
73
+ // ).str as string;
74
+ return "correction";
75
+ };
76
+ const getPropositions = (n, { answer, ..._identifiers }, _optsIn) => {
77
+ const propositions = [];
78
+ addValidProp(propositions, answer);
79
+ //filler
80
+ {
81
+ propWhile(propositions, n, () => {
82
+ tryToAddWrongProp(propositions, randint(1, 25).frenchify());
83
+ });
84
+ }
85
+ return shuffleProps(propositions, n);
86
+ };
87
+ const isAnswerValid = (ans, { answer }) => {
88
+ try {
89
+ return numberVEA(ans, answer);
90
+ }
91
+ catch (err) {
92
+ return handleVEAError(err);
93
+ }
94
+ };
95
+ const getGeometricFindThresholdFromSituationQuestion = (optsIn) => {
96
+ const opts = optsIn ?? optsDefault;
97
+ const { isWithSuperfluousData } = opts;
98
+ const firstRank = opts?.firstTermRankOne ? 1 : 0;
99
+ const situationIndex = randint(0, situations.length);
100
+ const situation = situations[situationIndex];
101
+ const initial = situation.randInitial();
102
+ const reason = situation.randReason();
103
+ const superfluousData = isWithSuperfluousData
104
+ ? situation.randSuperfluousData()
105
+ : undefined;
106
+ const valueThreshold = situation.randThreshold(initial, reason, firstRank);
107
+ const inegSymbol = InequationSymbolConstructor.randomSymbol();
108
+ const identifiers = {
109
+ situationIndex,
110
+ initial,
111
+ reason,
112
+ superfluousData,
113
+ valueThreshold,
114
+ inegSymbol,
115
+ };
116
+ return getQuestionFromIdentifiers(identifiers, opts);
117
+ };
118
+ const getQuestionFromIdentifiers = (identifiers, opts) => {
119
+ const question = {
120
+ answer: getAnswer(identifiers, opts),
121
+ instruction: getInstruction(identifiers, opts),
122
+ keys: [],
123
+ answerFormat: "tex",
124
+ identifiers,
125
+ hint: getHint(identifiers, opts),
126
+ correction: getCorrection(identifiers, opts),
127
+ options: opts,
128
+ };
129
+ return question;
130
+ };
131
+ const optionsStuffFirstTermRankOne = getOptionFirstTermRankOneStuff(false);
132
+ const optionsStuffIsWithSuperfluousData = getOptionIsWithSuperfluousData(false);
133
+ const optsDefault = Object.assign({}, optionsStuffFirstTermRankOne.optsDefaultFirstTermRankOne, optionsStuffIsWithSuperfluousData.optsDefaultIsWithSuperfluousData);
134
+ const options = [
135
+ optionsStuffFirstTermRankOne.generatorOptionFirstTermRankOne,
136
+ optionsStuffIsWithSuperfluousData.generatorOptionIsWithSuperfluousData,
137
+ ];
138
+ export const geometricFindThresholdFromSituation = {
139
+ id: "geometricFindThresholdFromSituation",
140
+ connector: "=",
141
+ label: "À partir d'une situation décrivant une évolution géométrique, calculer un seuil",
142
+ isSingleStep: true,
143
+ generator: (nb, opts) => getDistinctQuestions(() => getGeometricFindThresholdFromSituationQuestion(opts), nb),
144
+ options,
145
+ qcmTimer: 60,
146
+ freeTimer: 60,
147
+ getPropositions,
148
+ isAnswerValid,
149
+ subject: "Mathématiques",
150
+ getQuestionFromIdentifiers,
151
+ hasHintAndCorrection: true,
152
+ };
@@ -0,0 +1,4 @@
1
+ export * from "./geometricFindExplicitFormulaFromSituation.js";
2
+ export * from "./geometricFindRecurrenceFormulaFromSituation.js";
3
+ export * from "./geometricFindTermFromSituation.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/situations/index.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,qCAAqC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from "./geometricFindExplicitFormulaFromSituation.js";
2
+ export * from "./geometricFindRecurrenceFormulaFromSituation.js";
3
+ export * from "./geometricFindTermFromSituation.js";
4
+ // export * from "./geometricFindRankFromSituation.js";
5
+ // export * from "./geometricFindThresholdFromSituation.js";
@@ -0,0 +1,15 @@
1
+ import { Exercise } from "../../../../../exercises/exercise.js";
2
+ import { OptionFirstTermRankOne } from "../../../../../exercises/options/optionFirstTermRankOne.js";
3
+ type Identifiers = {
4
+ initial: number;
5
+ reason: number;
6
+ nbTerms: number;
7
+ lowRankDots: number;
8
+ highRankDots: number;
9
+ };
10
+ type Options = OptionFirstTermRankOne & {
11
+ isGiveCount: boolean;
12
+ };
13
+ export declare const geometricComputeSumWithDots: Exercise<Identifiers, Options>;
14
+ export {};
15
+ //# sourceMappingURL=geometricComputeSumWithDots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geometricComputeSumWithDots.d.ts","sourceRoot":"","sources":["../../../../../../src/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,sBAAsB,EACvB,MAAM,mDAAmD,CAAC;AA0E3D,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA6OF,KAAK,OAAO,GAAG,sBAAsB,GAAG;IAAE,WAAW,EAAE,OAAO,CAAA;CAAE,CAAC;AAiBjE,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAkBtE,CAAC"}