math-exercises 3.0.177 → 3.0.179

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 (255) hide show
  1. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.d.ts +14 -0
  2. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.d.ts.map +1 -0
  3. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving1.js +283 -0
  4. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts +15 -0
  5. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.d.ts.map +1 -0
  6. package/lib/exercises/math/derivation/derivative/derivativeEquationSolving3.js +296 -0
  7. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +3 -3
  8. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts +14 -0
  9. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.d.ts.map +1 -0
  10. package/lib/exercises/math/derivation/derivative/exp/expDerivativeProductFExp.js +346 -0
  11. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts +15 -0
  12. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.d.ts.map +1 -0
  13. package/lib/exercises/math/derivation/derivative/exp/expDerivativeQuotientFExp.js +435 -0
  14. package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts +13 -0
  15. package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.d.ts.map +1 -0
  16. package/lib/exercises/math/derivation/derivative/valueDerivativeFromFunctionExpression.js +326 -0
  17. package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts +14 -0
  18. package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.d.ts.map +1 -0
  19. package/lib/exercises/math/derivation/derivativeNumber/signOfDerivativeNumberFromFunctionCurve.js +181 -0
  20. package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts +10 -0
  21. package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.d.ts.map +1 -0
  22. package/lib/exercises/math/derivation/derivativeNumber/valueTableImageAndDerivativeFromFunctionExpression.js +272 -0
  23. package/lib/exercises/math/derivation/problems/index.d.ts +5 -0
  24. package/lib/exercises/math/derivation/problems/index.d.ts.map +1 -0
  25. package/lib/exercises/math/derivation/problems/index.js +4 -0
  26. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts +8 -0
  27. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.d.ts.map +1 -0
  28. package/lib/exercises/math/derivation/problems/problemMaximizeBoxVolumeFindX.js +171 -0
  29. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts +15 -0
  30. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.d.ts.map +1 -0
  31. package/lib/exercises/math/derivation/problems/problemMaximizeProfitFindProduction.js +328 -0
  32. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts +13 -0
  33. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.d.ts.map +1 -0
  34. package/lib/exercises/math/derivation/problems/problemMovementOnLineFindSpeedAtPoint.js +275 -0
  35. package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts +8 -0
  36. package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.d.ts.map +1 -0
  37. package/lib/exercises/math/derivation/problems/problemProjectileHeightFindAbscissa.js +137 -0
  38. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts +10 -0
  39. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.d.ts.map +1 -0
  40. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineY.js +478 -0
  41. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts +10 -0
  42. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.d.ts.map +1 -0
  43. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingLineYAndSlope.js +499 -0
  44. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts +10 -0
  45. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.d.ts.map +1 -0
  46. package/lib/exercises/math/derivation/tangent/derivativeEquationSolvingByManipulatingPoint.js +240 -0
  47. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts +12 -0
  48. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.d.ts.map +1 -0
  49. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingBuildingTangent.js +436 -0
  50. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts +12 -0
  51. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.d.ts.map +1 -0
  52. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingPoint.js +219 -0
  53. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts +13 -0
  54. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.d.ts.map +1 -0
  55. package/lib/exercises/math/derivation/tangent/derivativeReadingByManipulatingSecant.js +273 -0
  56. package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts +18 -0
  57. package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.d.ts.map +1 -0
  58. package/lib/exercises/math/derivation/tangent/placePointsOfDerivativeFromGraph.js +295 -0
  59. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts +13 -0
  60. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.d.ts.map +1 -0
  61. package/lib/exercises/math/derivation/tangent/tangentEquationFromFunctionExpression.js +388 -0
  62. package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts +9 -0
  63. package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.d.ts.map +1 -0
  64. package/lib/exercises/math/derivation/tangent/tangentEquationFromGraph.js +308 -0
  65. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts +14 -0
  66. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.d.ts.map +1 -0
  67. package/lib/exercises/math/derivation/variations/findAbscissaOfExtremaFromFunctionExpression.js +439 -0
  68. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts +14 -0
  69. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.d.ts.map +1 -0
  70. package/lib/exercises/math/derivation/variations/findExtremaFromFunctionExpression.js +547 -0
  71. package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts +15 -0
  72. package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.d.ts.map +1 -0
  73. package/lib/exercises/math/derivation/variations/plausibleDerivativeGraphFromFunctionGraphByManipulatingPolynomial.js +537 -0
  74. package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts +15 -0
  75. package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.d.ts.map +1 -0
  76. package/lib/exercises/math/derivation/variations/plausibleFunctionGraphFromDerivativeGraphByManipulatingPolynomial.js +639 -0
  77. package/lib/exercises/math/derivation/variations/readExtremaAbscissFromDerivativeCurve.js +1 -1
  78. package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts +14 -0
  79. package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.d.ts.map +1 -0
  80. package/lib/exercises/math/derivation/variations/signVarTableFromFunctionExpression.js +530 -0
  81. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts +10 -0
  82. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.d.ts.map +1 -0
  83. package/lib/exercises/math/derivation/variations/signVarTableProductFExp.js +451 -0
  84. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts +11 -0
  85. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.d.ts.map +1 -0
  86. package/lib/exercises/math/derivation/variations/signVarTableQuotientFExp.js +514 -0
  87. package/lib/exercises/math/functions/composition/index.d.ts +0 -1
  88. package/lib/exercises/math/functions/composition/index.d.ts.map +1 -1
  89. package/lib/exercises/math/functions/composition/index.js +1 -1
  90. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts +0 -1
  91. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts.map +1 -1
  92. package/lib/exercises/math/functions/exponential/algebraic/index.js +1 -1
  93. package/lib/exercises/math/functions/trinoms/sign/index.d.ts +1 -0
  94. package/lib/exercises/math/functions/trinoms/sign/index.d.ts.map +1 -1
  95. package/lib/exercises/math/functions/trinoms/sign/index.js +1 -0
  96. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts +8 -0
  97. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.d.ts.map +1 -0
  98. package/lib/exercises/math/functions/trinoms/sign/signOfProductOfAffineAndTrinom.js +226 -0
  99. package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.d.ts.map +1 -1
  100. package/lib/exercises/math/geometry/angles/parallelogramFourthAngle.js +10 -10
  101. package/lib/exercises/math/geometry/quadrilaterals/parallelogramAngles.js +8 -8
  102. package/lib/exercises/math/geometry/triangles/similar/isSimilarTrianglesWithAngles.js +6 -6
  103. package/lib/exercises/math/geometry/triangles/triangleThirdAngleValue.js +8 -8
  104. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiAngle.js +1 -1
  105. package/lib/exercises/math/geometry/vectors/scalarProduct/alKashi/scalarProductAlKashiSideLength.js +2 -2
  106. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +2 -2
  107. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -1
  108. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +32 -17
  109. package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts +13 -0
  110. package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.d.ts.map +1 -0
  111. package/lib/exercises/math/probaStat/conditional/conditionalProbaFromTableWithContext.js +195 -0
  112. package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts +9 -0
  113. package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.d.ts.map +1 -0
  114. package/lib/exercises/math/probaStat/conditional/conditionalProbaWriteFromFrench.js +220 -0
  115. package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts +15 -0
  116. package/lib/exercises/math/probaStat/conditional/conditionalProbability.d.ts.map +1 -0
  117. package/lib/exercises/math/probaStat/conditional/conditionalProbability.js +332 -0
  118. package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts +8 -0
  119. package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.d.ts.map +1 -0
  120. package/lib/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.js +222 -0
  121. package/lib/exercises/math/probaStat/conditional/index.d.ts +5 -0
  122. package/lib/exercises/math/probaStat/conditional/index.d.ts.map +1 -0
  123. package/lib/exercises/math/probaStat/conditional/index.js +4 -0
  124. package/lib/exercises/math/probaStat/index.d.ts +1 -2
  125. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  126. package/lib/exercises/math/probaStat/index.js +1 -2
  127. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts +1 -0
  128. package/lib/exercises/math/probaStat/probaFromTableWithContext.d.ts.map +1 -1
  129. package/lib/exercises/math/probaStat/probaFromTableWithContext.js +26 -199
  130. package/lib/exercises/math/probaStat/randomVariable/index.d.ts.map +1 -1
  131. package/lib/exercises/math/probaStat/randomVariable/index.js +1 -0
  132. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.d.ts.map +1 -1
  133. package/lib/exercises/math/probaStat/randomVariable/randomVariableSituationProbabilityLaw.js +6 -2
  134. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.d.ts.map +1 -1
  135. package/lib/exercises/math/probaStat/randomVariable/utils/randomVariableSituations.js +6 -5
  136. package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.d.ts.map +1 -1
  137. package/lib/exercises/math/probaStat/trees/buildTreeFromSituation.js +4 -27
  138. package/lib/exercises/math/probaStat/twoEventsSituations.d.ts +29 -0
  139. package/lib/exercises/math/probaStat/twoEventsSituations.d.ts.map +1 -0
  140. package/lib/exercises/math/probaStat/twoEventsSituations.js +145 -0
  141. package/lib/exercises/math/python/index.d.ts +1 -0
  142. package/lib/exercises/math/python/index.d.ts.map +1 -1
  143. package/lib/exercises/math/python/index.js +1 -0
  144. package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.d.ts.map +1 -1
  145. package/lib/exercises/math/python/sequences/pySequenceThresholdInstructionCompletion.js +11 -8
  146. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
  147. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFromTwoTerms.js +4 -3
  148. package/lib/exercises/math/sequences/arithmetic/index.d.ts +4 -3
  149. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  150. package/lib/exercises/math/sequences/arithmetic/index.js +4 -3
  151. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.d.ts.map +1 -1
  152. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindExplicitFormulaFromSituation.js +3 -2
  153. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.d.ts.map +1 -1
  154. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindRankFromSituation.js +8 -6
  155. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.d.ts.map +1 -1
  156. package/lib/exercises/math/sequences/arithmetic/situations/arithmeticFindThresholdFromSituation.js +6 -5
  157. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts +0 -2
  158. package/lib/exercises/math/sequences/arithmetic/situations/index.d.ts.map +1 -1
  159. package/lib/exercises/math/sequences/arithmetic/situations/index.js +2 -2
  160. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts +1 -0
  161. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.d.ts.map +1 -1
  162. package/lib/exercises/math/sequences/arithmetic/sum/arithmeticComputeSumWithDots.js +65 -14
  163. package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts +0 -1
  164. package/lib/exercises/math/sequences/arithmetic/sum/index.d.ts.map +1 -1
  165. package/lib/exercises/math/sequences/arithmetic/sum/index.js +1 -1
  166. package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts +4 -1
  167. package/lib/exercises/math/sequences/explicitFormulaUsage.d.ts.map +1 -1
  168. package/lib/exercises/math/sequences/explicitFormulaUsage.js +47 -7
  169. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts +14 -0
  170. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.d.ts.map +1 -0
  171. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoConsecutiveTerms.js +291 -0
  172. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.d.ts.map +1 -1
  173. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFromTwoTerms.js +4 -3
  174. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts +15 -0
  175. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.d.ts.map +1 -0
  176. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoConsecutiveTerms.js +249 -0
  177. package/lib/exercises/math/sequences/geometric/geometricFindRandomTermFromTwoTerms.js +2 -2
  178. package/lib/exercises/math/sequences/geometric/index.d.ts +3 -2
  179. package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
  180. package/lib/exercises/math/sequences/geometric/index.js +6 -2
  181. package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.d.ts.map +1 -1
  182. package/lib/exercises/math/sequences/geometric/situations/geometricFindExplicitFormulaFromSituation.js +3 -2
  183. package/lib/exercises/math/sequences/geometric/situations/geometricFindTermFromSituation.js +1 -1
  184. package/lib/exercises/math/sequences/geometric/situations/index.d.ts +0 -1
  185. package/lib/exercises/math/sequences/geometric/situations/index.d.ts.map +1 -1
  186. package/lib/exercises/math/sequences/geometric/situations/index.js +1 -1
  187. package/lib/exercises/math/sequences/geometric/sum/geometricComputeSumWithDots.js +2 -2
  188. package/lib/exercises/math/sequences/graph/placeFirstSequencePoints.js +2 -2
  189. package/lib/exercises/math/sequences/index.d.ts +1 -0
  190. package/lib/exercises/math/sequences/index.d.ts.map +1 -1
  191. package/lib/exercises/math/sequences/index.js +1 -0
  192. package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts +5 -1
  193. package/lib/exercises/math/sequences/recurrenceFormulaUsage.d.ts.map +1 -1
  194. package/lib/exercises/math/sequences/recurrenceFormulaUsage.js +89 -9
  195. package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.d.ts.map +1 -1
  196. package/lib/exercises/math/sequences/seqArithmGeom/seqArithmGeomRecurrenceFormulaUsage.js +5 -9
  197. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.2d.js +1 -1
  198. package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -1
  199. package/lib/exercises/math/trigonometry/circle/associatePoint.js +55 -6
  200. package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.d.ts.map +1 -1
  201. package/lib/exercises/math/trigonometry/circle/selectQuadrantOnTrigoCircle.js +5 -6
  202. package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.d.ts.map +1 -1
  203. package/lib/exercises/math/trigonometry/functions/associateAngleSimplification.js +1 -3
  204. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +2 -2
  205. package/lib/exercises/pc/snellDescartes.js +2 -2
  206. package/lib/exercises/vea/polynomialVEA.d.ts +2 -0
  207. package/lib/exercises/vea/polynomialVEA.d.ts.map +1 -0
  208. package/lib/exercises/vea/polynomialVEA.js +17 -0
  209. package/lib/exercises/vea/valueTableVEA.d.ts +8 -0
  210. package/lib/exercises/vea/valueTableVEA.d.ts.map +1 -0
  211. package/lib/exercises/vea/valueTableVEA.js +12 -0
  212. package/lib/index.d.ts +152 -41
  213. package/lib/index.d.ts.map +1 -1
  214. package/lib/latexTester.d.ts.map +1 -1
  215. package/lib/latexTester.js +9 -6
  216. package/lib/math/polynomials/affine.d.ts +1 -0
  217. package/lib/math/polynomials/affine.d.ts.map +1 -1
  218. package/lib/math/polynomials/affine.js +5 -0
  219. package/lib/math/utils/arithmetic/primeFactors.js +1 -1
  220. package/lib/math/utils/functions/functionComposition.d.ts.map +1 -1
  221. package/lib/math/utils/functions/functionComposition.js +18 -1
  222. package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts +19 -0
  223. package/lib/math/utils/polynomial/polynomialInterpolationUtils.d.ts.map +1 -0
  224. package/lib/math/utils/polynomial/polynomialInterpolationUtils.js +53 -0
  225. package/lib/math/utils/polynomial/polynomialUtils.d.ts +37 -0
  226. package/lib/math/utils/polynomial/polynomialUtils.d.ts.map +1 -0
  227. package/lib/math/utils/polynomial/polynomialUtils.js +223 -0
  228. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts +18 -4
  229. package/lib/math/utils/sequences/situations/seqArithmeticSituations.d.ts.map +1 -1
  230. package/lib/math/utils/sequences/situations/seqArithmeticSituations.js +434 -333
  231. package/lib/math/utils/sequences/situations/seqArithmeticUtils.d.ts.map +1 -1
  232. package/lib/math/utils/sequences/situations/seqArithmeticUtils.js +3 -1
  233. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts +5 -0
  234. package/lib/math/utils/sequences/situations/seqGeometricSituations.d.ts.map +1 -1
  235. package/lib/math/utils/sequences/situations/seqGeometricSituations.js +58 -25
  236. package/lib/prototypesEnhancement.d.ts +1 -0
  237. package/lib/prototypesEnhancement.d.ts.map +1 -1
  238. package/lib/prototypesEnhancement.js +3 -0
  239. package/lib/tests/pdfs/mdCodeToLatex.d.ts.map +1 -1
  240. package/lib/tests/pdfs/mdCodeToLatex.js +8 -15
  241. package/lib/tests/questionTest.d.ts.map +1 -1
  242. package/lib/tests/questionTest.js +6 -3
  243. package/lib/tree/nodes/geometry/degree.js +1 -1
  244. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  245. package/lib/tree/nodes/operators/multiplyNode.js +1 -1
  246. package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
  247. package/lib/tree/nodes/operators/substractNode.js +2 -1
  248. package/lib/tree/parsers/degreeParser.js +2 -2
  249. package/lib/tree/utilities/nodeUtils.d.ts +6 -0
  250. package/lib/tree/utilities/nodeUtils.d.ts.map +1 -0
  251. package/lib/tree/utilities/nodeUtils.js +24 -0
  252. package/lib/utils/strings/prependArticle.d.ts +2 -0
  253. package/lib/utils/strings/prependArticle.d.ts.map +1 -0
  254. package/lib/utils/strings/prependArticle.js +1 -0
  255. package/package.json +1 -1
@@ -0,0 +1,332 @@
1
+ /* eslint-disable @typescript-eslint/naming-convention*/
2
+ //? it makes sense here to use pA_B
3
+ import { randint } from "../../../../math/utils/random/randint.js";
4
+ import { GeneratorOptionTarget, GeneratorOptionType, addValidProp, propWhile, tryToAddWrongProp, } from "../../../exercise.js";
5
+ import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
6
+ import { round } from "../../../../math/utils/round.js";
7
+ import { shuffle } from "../../../../utils/alea/shuffle.js";
8
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
9
+ import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
10
+ import { random } from "../../../../utils/alea/random.js";
11
+ const getInstruction = (identifiers) => {
12
+ const { flip, pA, pAB, pA_B, pB, pB_A } = identifiers;
13
+ let instruction = `On considère deux événements $A$ et $B$ tels que `;
14
+ switch (flip) {
15
+ case 1: {
16
+ const pAStr = (pA / 100).frenchify();
17
+ const pABStr = (pAB / 100).frenchify();
18
+ instruction += `$P(A) = ${pAStr}\\ $ et $\\ P(A \\cap B) = ${pABStr}$.
19
+
20
+ Déterminer $P_A(B)$ (arrondir au centième).`;
21
+ break;
22
+ }
23
+ case 2: {
24
+ const pBStr = (pB / 100).frenchify();
25
+ const pABStr = (pAB / 100).frenchify();
26
+ instruction += `$P(B) = ${pBStr}\\ $ et $\\ P(B \\cap A) = ${pABStr}$.
27
+
28
+ Déterminer $P_B(A)$ (arrondir au centième).`;
29
+ break;
30
+ }
31
+ case 3: {
32
+ const pAStr = (pA / 100).frenchify();
33
+ const pB_AStr = (pB_A / 100).frenchify();
34
+ instruction += `$P(A) = ${pAStr}\\ $ et $\\ P_A(B) = ${pB_AStr}$.
35
+
36
+ Déterminer $P(A \\cap B)$ (arrondir au centième).`;
37
+ break;
38
+ }
39
+ case 4: {
40
+ const pBStr = (pB / 100).frenchify();
41
+ const pA_BStr = (pA_B / 100).frenchify();
42
+ instruction += `$P(B) = ${pBStr}\\ $ et $\\ P_B(A) = ${pA_BStr}$.
43
+
44
+ Déterminer $P(A \\cap B)$ (arrondir au centième).`;
45
+ break;
46
+ }
47
+ case 5: {
48
+ const pABStr = (pAB / 100).frenchify();
49
+ const pA_BStr = (pA_B / 100).frenchify();
50
+ instruction += `$P(A \\cap B) = ${pABStr}\\ $ et $\\ P_B(A) = ${pA_BStr}$.
51
+
52
+ Déterminer $P(B)$ (arrondir au centième).`;
53
+ break;
54
+ }
55
+ case 6: {
56
+ const pABStr = (pAB / 100).frenchify();
57
+ const pB_AStr = (pB_A / 100).frenchify();
58
+ instruction += `$P(A \\cap B) = ${pABStr}\\ $ et $\\ P_A(B) = ${pB_AStr}$.
59
+
60
+ Déterminer $P(A)$ (arrondir au centième).`;
61
+ break;
62
+ }
63
+ }
64
+ return instruction;
65
+ };
66
+ const getAnswer = (identifiers) => {
67
+ const { flip, pA, pAB, pB } = identifiers;
68
+ switch (flip) {
69
+ case 1:
70
+ return round(pAB / pA, 2).frenchify();
71
+ case 2:
72
+ return round(pAB / pB, 2).frenchify();
73
+ case 3:
74
+ return pAB.frenchify();
75
+ case 4:
76
+ return pAB.frenchify();
77
+ case 5:
78
+ return pB.frenchify();
79
+ case 6:
80
+ default:
81
+ return pA.frenchify();
82
+ }
83
+ };
84
+ const getHint = () => {
85
+ return `Pour deux événements $M$ et $N$, on a:
86
+
87
+ $$
88
+ P_M(N) = \\frac{P(M \\cap N)}{P(M)}
89
+ $$
90
+ `;
91
+ };
92
+ const getStartStatement = (identifiers) => {
93
+ const { flip } = identifiers;
94
+ switch (flip) {
95
+ case 1:
96
+ return `P_A(B)`;
97
+ case 2:
98
+ return `P_B(A)`;
99
+ case 3:
100
+ return `P(A \\cap B)`;
101
+ case 4:
102
+ return `P(A \\cap B)`;
103
+ case 5:
104
+ return `P(B)`;
105
+ case 6:
106
+ default:
107
+ return `P(A)`;
108
+ }
109
+ };
110
+ const getCorrection = (identifiers) => {
111
+ const { flip, pA, pAB, pA_B, pB, pB_A } = identifiers;
112
+ const answer = getAnswer(identifiers);
113
+ switch (flip) {
114
+ case 1: {
115
+ const pAStr = (pA / 100).frenchify();
116
+ const pABStr = (pAB / 100).frenchify();
117
+ return `
118
+ On sait que :
119
+
120
+ $$
121
+ P_A(B) = \\frac{P(A \\cap B)}{P(A)}
122
+ $$
123
+
124
+ On a donc :
125
+
126
+ $$
127
+ P_A(B) = \\frac{${pABStr}}{${pAStr}} \\approx ${answer}
128
+ $$
129
+ `;
130
+ }
131
+ case 2: {
132
+ const pBStr = (pB / 100).frenchify();
133
+ const pABStr = (pAB / 100).frenchify();
134
+ return `
135
+ On sait que :
136
+
137
+ $$
138
+ P_B(A) = \\frac{P(A \\cap B)}{P(B)}
139
+ $$
140
+
141
+ On a donc :
142
+
143
+ $$
144
+ P_B(A) = \\frac{${pABStr}}{${pBStr}} \\approx ${answer}
145
+ $$
146
+ `;
147
+ }
148
+ case 3: {
149
+ const pAStr = (pA / 100).frenchify();
150
+ const pB_AStr = (pB_A / 100).frenchify();
151
+ return `
152
+ On sait que :
153
+
154
+ $$
155
+ P_A(B) = \\frac{P(A \\cap B)}{P(A)}
156
+ $$
157
+
158
+ On a donc :
159
+
160
+ ${alignTex([
161
+ ["P(A \\cap B)", "=", "P_A(B)\\times P(A)"],
162
+ ["", "=", `${pB_AStr}\\times ${pAStr}`],
163
+ ["", "\\approx", answer],
164
+ ])}
165
+ `;
166
+ }
167
+ case 4: {
168
+ const pBStr = (pB / 100).frenchify();
169
+ const pA_BStr = (pA_B / 100).frenchify();
170
+ return `
171
+ On sait que :
172
+
173
+ $$
174
+ P_B(A) = \\frac{P(A \\cap B)}{P(B)}
175
+ $$
176
+
177
+ On a donc :
178
+
179
+ ${alignTex([
180
+ ["P(A \\cap B)", "=", "P_B(A)\\times P(B)"],
181
+ ["", "=", `${pA_BStr}\\times ${pBStr}`],
182
+ ["", "\\approx", answer],
183
+ ])}
184
+ `;
185
+ }
186
+ case 5: {
187
+ const pABStr = (pAB / 100).frenchify();
188
+ const pA_BStr = (pA_B / 100).frenchify();
189
+ return `
190
+ On sait que :
191
+
192
+ $$
193
+ P_B(A) = \\frac{P(A \\cap B)}{P(B)}
194
+ $$
195
+
196
+ On a donc :
197
+
198
+ ${alignTex([
199
+ ["P(B)", "=", "\\frac{P(A\\cap B)}{P_B(A)}"],
200
+ ["", "=", `\\frac{${pABStr}}{${pA_BStr}}`],
201
+ ["", "\\approx", answer],
202
+ ])}
203
+ `;
204
+ }
205
+ case 6:
206
+ default: {
207
+ const pABStr = (pAB / 100).frenchify();
208
+ const pB_AStr = (pB_A / 100).frenchify();
209
+ return `
210
+ On sait que :
211
+
212
+ $$
213
+ P_A(B) = \\frac{P(A \\cap B)}{P(A)}
214
+ $$
215
+
216
+ On a donc :
217
+
218
+ ${alignTex([
219
+ ["P(A)", "=", "\\frac{P(A\\cap B)}{P_A(B)}"],
220
+ ["", "=", `\\frac{${pABStr}}{${pB_AStr}}`],
221
+ ["", "\\approx", answer],
222
+ ])}
223
+ `;
224
+ }
225
+ }
226
+ };
227
+ const getConditionalProbability = (opts) => {
228
+ let pA, pB, pAB, pA_B, pB_A;
229
+ const types = opts?.probaType ?? ["$P(A)$", "$P(A\\cap B)$", "$P_A(B)$"];
230
+ const flipChoices = [];
231
+ if (types.includes("$P(A)$"))
232
+ flipChoices.push(5, 6);
233
+ if (types.includes("$P(A\\cap B)$"))
234
+ flipChoices.push(3, 4);
235
+ if (types.includes("$P_A(B)$"))
236
+ flipChoices.push(1, 2);
237
+ const flip = random(flipChoices);
238
+ //1,2 = P_AB, 3,4 = PANB, 5,6 = PA
239
+ switch (flip) {
240
+ case 1:
241
+ pA = randint(2, 100);
242
+ pAB = randint(1, pA);
243
+ break;
244
+ case 2:
245
+ pB = randint(2, 100);
246
+ pAB = randint(1, pB);
247
+ break;
248
+ case 3:
249
+ pA = randint(2, 100);
250
+ pB_A = randint(1, pA);
251
+ pAB = round((pB_A * pA) / 10000, 2);
252
+ break;
253
+ case 4:
254
+ pB = randint(2, 100);
255
+ pA_B = randint(1, pB);
256
+ pAB = round((pA_B * pB) / 10000, 2);
257
+ break;
258
+ case 5:
259
+ pA_B = randint(1, 100);
260
+ pAB = randint(1, pA_B);
261
+ pB = round(pAB / pA_B, 2);
262
+ break;
263
+ case 6:
264
+ default:
265
+ pB_A = randint(1, 100);
266
+ pAB = randint(1, pB_A);
267
+ pA = round(pAB / pB_A, 2);
268
+ }
269
+ const identifiers = { flip, pA, pAB, pB, pA_B, pB_A };
270
+ return getQuestionFromIdentifiers(identifiers);
271
+ };
272
+ const options = [
273
+ {
274
+ id: "probaType",
275
+ label: "Probabilité demandée",
276
+ target: GeneratorOptionTarget.generation,
277
+ type: GeneratorOptionType.multiselect,
278
+ values: ["$P(A)$", "$P(A\\cap B)$", "$P_A(B)$"],
279
+ defaultValue: ["$P(A)$", "$P(A\\cap B)$", "$P_A(B)$"],
280
+ },
281
+ ];
282
+ const validateOptions = (opts) => {
283
+ if (!opts?.probaType?.length)
284
+ return {
285
+ valid: false,
286
+ message: "Veuillez choisir au moins un type de probabilité demandée.",
287
+ };
288
+ return {
289
+ valid: true,
290
+ message: "",
291
+ };
292
+ };
293
+ const getQuestionFromIdentifiers = (identifiers) => {
294
+ const question = {
295
+ instruction: getInstruction(identifiers),
296
+ startStatement: getStartStatement(identifiers),
297
+ answer: getAnswer(identifiers),
298
+ keys: ["p", "cap", "underscore"],
299
+ answerFormat: "tex",
300
+ identifiers,
301
+ hint: getHint(identifiers),
302
+ correction: getCorrection(identifiers),
303
+ };
304
+ return question;
305
+ };
306
+ const getPropositions = (n, { answer }) => {
307
+ const propositions = [];
308
+ addValidProp(propositions, answer);
309
+ propWhile(propositions, n, () => {
310
+ tryToAddWrongProp(propositions, (Math.floor(Math.random() * 100) / 100 + "").replace(".", ","));
311
+ });
312
+ return shuffle(propositions);
313
+ };
314
+ const isAnswerValid = (ans, { answer }) => {
315
+ return numberVEA(ans, answer);
316
+ };
317
+ export const conditionalProbability = {
318
+ id: "conditionalProbability",
319
+ connector: "=",
320
+ label: "Calcul de probabilité conditionnelle avec la formule de Bayes $P(A \\cap B) = P_A(B) \\times P(A)$",
321
+ isSingleStep: false,
322
+ generator: (nb, opts) => getDistinctQuestions(() => getConditionalProbability(opts), nb),
323
+ qcmTimer: 60,
324
+ freeTimer: 60,
325
+ getPropositions,
326
+ isAnswerValid,
327
+ subject: "Mathématiques",
328
+ hasHintAndCorrection: true,
329
+ getQuestionFromIdentifiers,
330
+ options,
331
+ validateOptions,
332
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { ProbaTreeSituationParams } from "../trees/probaTreeSituations.js";
3
+ type Identifiers = {
4
+ params: ProbaTreeSituationParams;
5
+ };
6
+ export declare const fillTableConditionalProbabilitySituation: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=fillTableConditionalProbabilitySituation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fillTableConditionalProbabilitySituation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/conditional/fillTableConditionalProbabilitySituation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAUrC,OAAO,EAGL,wBAAwB,EACzB,MAAM,iCAAiC,CAAC;AAEzC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,wBAAwB,CAAC;CAClC,CAAC;AAsOF,eAAO,MAAM,wCAAwC,EAAE,QAAQ,CAAC,WAAW,CAqB1E,CAAC"}
@@ -0,0 +1,222 @@
1
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
2
+ import { valueTableVEA } from "../../../../exercises/vea/valueTableVEA.js";
3
+ import { reifyAlgebraic } from "../../../../tree/nodes/nodeConstructor.js";
4
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
5
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
6
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
7
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
8
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
9
+ import { buildProbaTreeSituation, getProbaTreeSituation, } from "../trees/probaTreeSituations.js";
10
+ const getAnswerTable = (identifiers) => {
11
+ const situation = getProbaTreeSituation(identifiers.params);
12
+ const { firstCondProba, mainEventProba, secondCondProba } = situation;
13
+ const mainEventProbaDec = frac(mainEventProba, 100).evaluate();
14
+ const firstCondProbaDec = frac(firstCondProba, 100).evaluate();
15
+ const secondCondProbaDec = frac(secondCondProba, 100).evaluate();
16
+ const aNb = multiply(mainEventProbaDec, firstCondProbaDec).simplify();
17
+ const abarreNb = multiply(substract(1, mainEventProbaDec), secondCondProbaDec).simplify();
18
+ const pb = add(aNb, abarreNb).simplify();
19
+ return [
20
+ [
21
+ "$\\ $",
22
+ `${situation.secondEvent}`,
23
+ `\\overline{${situation.secondEvent}}`,
24
+ "\\text{Total}",
25
+ ],
26
+ [
27
+ `$${situation.mainEvent}$`,
28
+ `${aNb.toTex()}`,
29
+ `${substract(mainEventProbaDec, aNb).simplify().toTex()}`,
30
+ `${mainEventProbaDec.frenchify()}`,
31
+ ],
32
+ [
33
+ `$\\overline{${situation.mainEvent}}$`,
34
+ `${abarreNb.toTex()}`,
35
+ `${substract(1 - mainEventProbaDec, abarreNb)
36
+ .simplify()
37
+ .toTex()}`,
38
+ `${substract(1, mainEventProbaDec).simplify().toTex()}`,
39
+ ],
40
+ ["Total", `${pb.toTex()}`, `${substract(1, pb).simplify().toTex()}`, "1"],
41
+ ];
42
+ };
43
+ const getInstruction = (identifiers) => {
44
+ const { params } = identifiers;
45
+ const situation = getProbaTreeSituation(params);
46
+ return `${situation.context}
47
+
48
+ Compléter le tableau suivant avec les probabilités manquantes.`;
49
+ };
50
+ const getHint = () => {
51
+ return `Commence par remplir la colonne "Total" à la droite du tableau.
52
+
53
+ Puis, sers-toi des probabilités conditionnelles données dans l'énoncé pour déterminer les probabilités manquantes. Les cases à l'intersection de deux évenements représentent des probabilités d'intersection.`;
54
+ };
55
+ const getCorrection = (identifiers) => {
56
+ const { params } = identifiers;
57
+ const situation = getProbaTreeSituation(params);
58
+ let mainEventProba;
59
+ let firstCondProba;
60
+ let secondCondProba;
61
+ const mainEvent = situation.mainEvent;
62
+ const secondEvent = situation.secondEvent;
63
+ switch (params.id) {
64
+ case "virus":
65
+ {
66
+ const { pContamineIds, pNegSainIds, pPosContamineIds } = params;
67
+ const pContamine = reifyAlgebraic(pContamineIds);
68
+ const pPosContamine = reifyAlgebraic(pPosContamineIds);
69
+ const pNegSain = reifyAlgebraic(pNegSainIds);
70
+ const aNb = multiply(frac(pContamine, 100), frac(pPosContamine, 100)).evaluate();
71
+ const abarreNbbarre = multiply(substract(1, frac(pContamine, 100)), frac(pNegSain, 100)).evaluate();
72
+ return `D'après l'énoncé, on a :
73
+
74
+ $$
75
+ P(C) = ${pContamine.toTex()}\\%
76
+ $$
77
+
78
+ $$
79
+ P_C(T) = ${pPosContamine.toTex()}\\%
80
+ $$
81
+
82
+ $$
83
+ P_{\\overline{C}}\\left(\\overline{T}\\right) = ${pNegSain.toTex()}\\%
84
+ $$
85
+
86
+ On en déduit les probabilités manquantes :
87
+
88
+ $$
89
+ P(C\\cap T) = P(C)\\times P_C(T) = ${aNb.frenchify()}
90
+ $$
91
+
92
+ donc
93
+
94
+ $$
95
+ P(C\\cap \\overline{T}) = P(C)-P(C\\cap T) =
96
+ ${substract(frac(pContamine, 100), aNb).evaluate().frenchify()}
97
+ $$
98
+
99
+
100
+ et
101
+
102
+ $$
103
+ P(\\overline{C}\\cap \\overline{T}) = P(\\overline{C})\\times P_{\\overline{C}}(\\overline{T}) = ${abarreNbbarre.frenchify()}
104
+ $$
105
+
106
+ donc
107
+
108
+ $$
109
+ P(\\overline{C}\\cap T) = P(\\overline{C})- P(\\overline{C}\\cap \\overline{T}) = ${substract(substract(1, frac(pContamine, 100)), abarreNbbarre)
110
+ .evaluate()
111
+ .frenchify()}
112
+ $$
113
+
114
+ `;
115
+ }
116
+ break;
117
+ default:
118
+ mainEventProba = situation.mainEventProba;
119
+ secondCondProba = situation.secondCondProba;
120
+ firstCondProba = situation.firstCondProba;
121
+ break;
122
+ }
123
+ const aNb = multiply(frac(mainEventProba, 100), frac(firstCondProba, 100)).evaluate();
124
+ const abarreNb = multiply(frac(substract(100, mainEventProba), 100), frac(secondCondProba, 100)).evaluate();
125
+ return `D'après l'énoncé, on a :
126
+
127
+ $$
128
+ P(${mainEvent}) = ${mainEventProba.toTex()}\\%
129
+ $$
130
+
131
+ $$
132
+ P_{${mainEvent}}(${secondEvent}) = ${firstCondProba.toTex()}\\%
133
+ $$
134
+
135
+ $$
136
+ P_{\\overline{${mainEvent}}}(${secondEvent}) = ${secondCondProba.toTex()}\\%
137
+ $$
138
+
139
+ On en déduit les probabilités manquantes :
140
+
141
+ $$
142
+ P(${mainEvent}\\cap ${secondEvent}) = P(${mainEvent})\\times P_{${mainEvent}}(${secondEvent}) = ${aNb.frenchify()}
143
+ $$
144
+
145
+ donc
146
+
147
+ $$
148
+ P(${mainEvent}\\cap \\overline{${secondEvent}}) = P(${mainEvent})-P(${mainEvent}\\cap ${secondEvent}) =
149
+ ${substract(frac(mainEventProba, 100), aNb).evaluate().frenchify()}
150
+ $$
151
+
152
+ et
153
+
154
+ $$
155
+ P(\\overline{${mainEvent}}\\cap ${secondEvent}) = P(\\overline{${mainEvent}})\\times P_{\\overline{${mainEvent}}}(${secondEvent}) = ${abarreNb.frenchify()}
156
+ $$
157
+
158
+ donc
159
+
160
+ $$
161
+ P(\\overline{${mainEvent}}\\cap \\overline{${secondEvent}}) = P(\\overline{${mainEvent}})- P(\\overline{${mainEvent}}\\cap ${secondEvent}) = ${substract(substract(1, frac(mainEventProba, 100)), abarreNb)
162
+ .evaluate()
163
+ .frenchify()}
164
+ $$
165
+ `;
166
+ };
167
+ const getKeys = () => {
168
+ return [];
169
+ };
170
+ const isAnswerTableValid = (ans, { answerTable }) => {
171
+ try {
172
+ return valueTableVEA(ans, answerTable);
173
+ }
174
+ catch (err) {
175
+ return handleVEAError(err);
176
+ }
177
+ };
178
+ const getFillTableConditionalProbabilityQuestion = () => {
179
+ const params = buildProbaTreeSituation();
180
+ const identifiers = { params };
181
+ return getQuestionFromIdentifiers(identifiers);
182
+ };
183
+ const getQuestionFromIdentifiers = (identifiers) => {
184
+ const situation = getProbaTreeSituation(identifiers.params);
185
+ return {
186
+ answerTable: getAnswerTable(identifiers),
187
+ instruction: getInstruction(identifiers),
188
+ keys: getKeys(identifiers),
189
+ answerFormat: "tex",
190
+ identifiers,
191
+ hint: getHint(identifiers),
192
+ correction: getCorrection(identifiers),
193
+ initTable: [
194
+ [
195
+ "$\\ $",
196
+ `${situation.secondEvent}`,
197
+ `\\overline{${situation.secondEvent}}`,
198
+ "\\text{Total}",
199
+ ],
200
+ [`$${situation.mainEvent}$`, "", "", ""],
201
+ [`$\\overline{${situation.mainEvent}}$`, "", "", ""],
202
+ ["Total", "", "", "1"],
203
+ ],
204
+ };
205
+ };
206
+ export const fillTableConditionalProbabilitySituation = {
207
+ id: "fillTableConditionalProbabilitySituation",
208
+ label: "Compléter un tableau à double entrée de probabilités à partir d'une situation",
209
+ isSingleStep: true,
210
+ generator: (nb, opts) => getDistinctQuestions(() => getFillTableConditionalProbabilityQuestion(opts), nb),
211
+ qcmTimer: 60,
212
+ freeTimer: 60,
213
+ subject: "Mathématiques",
214
+ getInstruction,
215
+ getHint,
216
+ getCorrection,
217
+ getAnswerTable,
218
+ getQuestionFromIdentifiers,
219
+ hasHintAndCorrection: true,
220
+ answerType: "valueTable",
221
+ isAnswerTableValid,
222
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./conditionalProbaWriteFromFrench.js";
2
+ export * from "./conditionalProbability.js";
3
+ export * from "./fillTableConditionalProbabilitySituation.js";
4
+ export * from "./conditionalProbaFromTableWithContext.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/conditional/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./conditionalProbaWriteFromFrench.js";
2
+ export * from "./conditionalProbability.js";
3
+ export * from "./fillTableConditionalProbabilitySituation.js";
4
+ export * from "./conditionalProbaFromTableWithContext.js";
@@ -1,4 +1,3 @@
1
- export * from "./conditionalProbability.js";
2
1
  export * from "./stats1var/index.js";
3
2
  export * from "./stats2var/index.js";
4
3
  export * from "./independancy/index.js";
@@ -13,7 +12,7 @@ export * from "./checkEquiprobability.js";
13
12
  export * from "./events/index.js";
14
13
  export * from "./basicProbas/index.js";
15
14
  export * from "./probaAsSumOfProbas.js";
16
- export * from "./conditionalProbaWriteFromFrench.js";
15
+ export * from "./conditional/index.js";
17
16
  export * from "./twoStepExperiments/index.js";
18
17
  export * from "./trees/index.js";
19
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sCAAsC,CAAC;AACrD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kBAAkB,CAAC"}
@@ -1,4 +1,3 @@
1
- export * from "./conditionalProbability.js";
2
1
  export * from "./stats1var/index.js";
3
2
  export * from "./stats2var/index.js";
4
3
  export * from "./independancy/index.js";
@@ -13,6 +12,6 @@ export * from "./checkEquiprobability.js";
13
12
  export * from "./events/index.js";
14
13
  export * from "./basicProbas/index.js";
15
14
  export * from "./probaAsSumOfProbas.js";
16
- export * from "./conditionalProbaWriteFromFrench.js";
15
+ export * from "./conditional/index.js";
17
16
  export * from "./twoStepExperiments/index.js";
18
17
  export * from "./trees/index.js";
@@ -14,6 +14,7 @@ type Identifiers = {
14
14
  };
15
15
  type Options = {
16
16
  allowedAnsType: string[];
17
+ probaTypes: string[];
17
18
  };
18
19
  export declare const probaFromTableWithContext: Exercise<Identifiers, Options>;
19
20
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"probaFromTableWithContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableWithContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;QACpB,uBAAuB,EAAE,MAAM,CAAC;QAChC,uBAAuB,EAAE,MAAM,CAAC;QAChC,mCAAmC,EAAE,MAAM,CAAC;KAC7C,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AA4oBF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AAsBF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBpE,CAAC"}
1
+ {"version":3,"file":"probaFromTableWithContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableWithContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE;QACN,WAAW,EAAE,MAAM,CAAC;QACpB,uBAAuB,EAAE,MAAM,CAAC;QAChC,uBAAuB,EAAE,MAAM,CAAC;QAChC,mCAAmC,EAAE,MAAM,CAAC;KAC7C,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AA+ZF,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AA+BF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBpE,CAAC"}