math-exercises 3.0.157 → 3.0.158

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 (260) hide show
  1. package/lib/exercises/exercise.d.ts +7 -0
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts +14 -0
  4. package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.d.ts.map +1 -0
  5. package/lib/exercises/math/calculLitteral/equation/exp/expOfAffineEquals1Equation.js +145 -0
  6. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts +16 -0
  7. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.d.ts.map +1 -0
  8. package/lib/exercises/math/calculLitteral/equation/exp/expOfFEqualsExpOfGEquation.js +444 -0
  9. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts +15 -0
  10. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.d.ts.map +1 -0
  11. package/lib/exercises/math/calculLitteral/equation/exp/expOfTrinomEquals1Equation.js +292 -0
  12. package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts +4 -0
  13. package/lib/exercises/math/calculLitteral/equation/exp/index.d.ts.map +1 -0
  14. package/lib/exercises/math/calculLitteral/equation/exp/index.js +3 -0
  15. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts +18 -0
  16. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.d.ts.map +1 -0
  17. package/lib/exercises/math/calculLitteral/inequations/exp/expOfFEqualsExpOfGInequation.js +437 -0
  18. package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts +2 -0
  19. package/lib/exercises/math/calculLitteral/inequations/exp/index.d.ts.map +1 -0
  20. package/lib/exercises/math/calculLitteral/inequations/exp/index.js +1 -0
  21. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.d.ts.map +1 -1
  22. package/lib/exercises/math/derivation/derivative/exp/expDerivativeOne.js +29 -0
  23. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.d.ts.map +1 -1
  24. package/lib/exercises/math/derivation/derivative/exp/expDerivativeThree.js +35 -2
  25. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.d.ts.map +1 -1
  26. package/lib/exercises/math/derivation/derivative/exp/expDerivativeTwo.js +19 -0
  27. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts +10 -0
  28. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.d.ts.map +1 -0
  29. package/lib/exercises/math/derivation/derivative/exp/expOverExpDerivative.js +282 -0
  30. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.d.ts.map +1 -1
  31. package/lib/exercises/math/derivation/derivative/inverseFunctionDerivative.js +30 -2
  32. package/lib/exercises/math/derivation/derivative/productDerivative.d.ts.map +1 -1
  33. package/lib/exercises/math/derivation/derivative/productDerivative.js +68 -1
  34. package/lib/exercises/math/derivation/derivative/quotientDerivative.d.ts.map +1 -1
  35. package/lib/exercises/math/derivation/derivative/quotientDerivative.js +40 -4
  36. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.d.ts.map +1 -1
  37. package/lib/exercises/math/derivation/derivative/sqrt/sqrtCompositionDerivation.js +30 -3
  38. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts +12 -0
  39. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.d.ts.map +1 -0
  40. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeAlgebraicExpression.js +127 -0
  41. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts +13 -0
  42. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.d.ts.map +1 -0
  43. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromAlgebraic.js +161 -0
  44. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts +11 -0
  45. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.d.ts.map +1 -0
  46. package/lib/exercises/math/derivation/derivativeNumber/averageRateOfChangeFromImages.js +116 -0
  47. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts +8 -0
  48. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.d.ts.map +1 -0
  49. package/lib/exercises/math/derivation/derivativeNumber/derivativeNumberCalcul.js +142 -0
  50. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts +4 -0
  51. package/lib/exercises/math/derivation/derivativeNumber/index.d.ts.map +1 -0
  52. package/lib/exercises/math/derivation/derivativeNumber/index.js +4 -0
  53. package/lib/exercises/math/derivation/index.d.ts +1 -1
  54. package/lib/exercises/math/derivation/index.js +1 -1
  55. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts +13 -0
  56. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.d.ts.map +1 -0
  57. package/lib/exercises/math/functions/exponential/algebraic/approxExpAPlusB.js +278 -0
  58. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts +11 -0
  59. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.d.ts.map +1 -0
  60. package/lib/exercises/math/functions/exponential/algebraic/approxExpKa.js +211 -0
  61. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts +9 -0
  62. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.d.ts.map +1 -0
  63. package/lib/exercises/math/functions/exponential/algebraic/approxExpN.js +142 -0
  64. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts +5 -0
  65. package/lib/exercises/math/functions/exponential/algebraic/index.d.ts.map +1 -0
  66. package/lib/exercises/math/functions/exponential/algebraic/index.js +4 -0
  67. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts +14 -0
  68. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.d.ts.map +1 -0
  69. package/lib/exercises/math/functions/exponential/algebraic/rewriteExpUsingExpA.js +337 -0
  70. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts +11 -0
  71. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.d.ts.map +1 -0
  72. package/lib/exercises/math/functions/exponential/definition/approxExpAPlusH.js +234 -0
  73. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts +9 -0
  74. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.d.ts.map +1 -0
  75. package/lib/exercises/math/functions/exponential/definition/expAntecedentFromGraph.js +190 -0
  76. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts +9 -0
  77. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.d.ts.map +1 -0
  78. package/lib/exercises/math/functions/exponential/definition/expImageFromGraph.js +190 -0
  79. package/lib/exercises/math/functions/exponential/definition/index.d.ts +5 -0
  80. package/lib/exercises/math/functions/exponential/definition/index.d.ts.map +1 -0
  81. package/lib/exercises/math/functions/exponential/definition/index.js +4 -0
  82. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts +13 -0
  83. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.d.ts.map +1 -0
  84. package/lib/exercises/math/functions/exponential/definition/isPlausibleExpFromGraph.js +375 -0
  85. package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.d.ts.map +1 -1
  86. package/lib/exercises/math/functions/trinoms/devForm/coefficientsIdentification.js +30 -3
  87. package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.d.ts.map +1 -1
  88. package/lib/exercises/math/functions/trinoms/equation/deltaTrinom.js +35 -1
  89. package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.d.ts.map +1 -1
  90. package/lib/exercises/math/functions/trinoms/parabole/paraboleExpressionReading.js +1 -1
  91. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.d.ts.map +1 -1
  92. package/lib/exercises/math/functions/trinoms/summitAndCanonical/alphaBetaInCanonicalForm.js +23 -1
  93. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map +1 -1
  94. package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js +29 -0
  95. package/lib/exercises/math/functions/variations/exp/index.d.ts +3 -0
  96. package/lib/exercises/math/functions/variations/exp/index.d.ts.map +1 -0
  97. package/lib/exercises/math/functions/variations/exp/index.js +2 -0
  98. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts +9 -0
  99. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.d.ts.map +1 -0
  100. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusB.js +101 -0
  101. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts +11 -0
  102. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.d.ts.map +1 -0
  103. package/lib/exercises/math/functions/variations/exp/varOfAEXPlusBOverCEXPlusD.js +192 -0
  104. package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.js +2 -2
  105. package/lib/exercises/math/geometry/thales/thales.js +1 -1
  106. package/lib/exercises/math/geometry/thales/thalesCalcul.js +1 -1
  107. package/lib/exercises/math/geometry/vectors/colinearity/determinant.js +1 -1
  108. package/lib/exercises/math/geometry/vectors/scalarProduct/angleFromScalarProduct.js +1 -1
  109. package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.d.ts.map +1 -1
  110. package/lib/exercises/math/geometry/vectors/scalarProduct/findCoordinatesToOrthogonalize.js +33 -7
  111. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +1 -1
  112. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts.map +1 -1
  113. package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +38 -1
  114. package/lib/exercises/math/probaStat/conditionalProbability.d.ts +4 -1
  115. package/lib/exercises/math/probaStat/conditionalProbability.d.ts.map +1 -1
  116. package/lib/exercises/math/probaStat/conditionalProbability.js +38 -5
  117. package/lib/exercises/math/probaStat/independancy/independancy.d.ts +9 -0
  118. package/lib/exercises/math/probaStat/independancy/independancy.d.ts.map +1 -0
  119. package/lib/exercises/math/probaStat/independancy/independancy.js +114 -0
  120. package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts +9 -0
  121. package/lib/exercises/math/probaStat/independancy/independancyFindCap.d.ts.map +1 -0
  122. package/lib/exercises/math/probaStat/independancy/independancyFindCap.js +101 -0
  123. package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts +9 -0
  124. package/lib/exercises/math/probaStat/independancy/independancyFindCup.d.ts.map +1 -0
  125. package/lib/exercises/math/probaStat/independancy/independancyFindCup.js +118 -0
  126. package/lib/exercises/math/probaStat/independancy/index.d.ts +5 -0
  127. package/lib/exercises/math/probaStat/independancy/index.d.ts.map +1 -0
  128. package/lib/exercises/math/probaStat/independancy/index.js +4 -0
  129. package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts +10 -0
  130. package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.d.ts.map +1 -0
  131. package/lib/exercises/math/probaStat/independancy/isIndependantFromDefinition.js +106 -0
  132. package/lib/exercises/math/probaStat/index.d.ts +1 -1
  133. package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
  134. package/lib/exercises/math/probaStat/index.js +1 -1
  135. package/lib/exercises/math/probaStat/randomVariable/randomVariableStandardDeviation.js +1 -1
  136. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.d.ts.map +1 -1
  137. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.js +7 -0
  138. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.d.ts.map +1 -1
  139. package/lib/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.js +7 -0
  140. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.d.ts.map +1 -1
  141. package/lib/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.js +7 -0
  142. package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.d.ts.map +1 -1
  143. package/lib/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.js +7 -0
  144. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts +9 -0
  145. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.d.ts.map +1 -0
  146. package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.js +118 -0
  147. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -1
  148. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +55 -6
  149. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.d.ts.map +1 -1
  150. package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +42 -1
  151. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts +4 -1
  152. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.d.ts.map +1 -1
  153. package/lib/exercises/math/sequences/arithmetic/arithmeticFirstTermsSum.js +57 -7
  154. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.d.ts.map +1 -1
  155. package/lib/exercises/math/sequences/arithmetic/arithmeticRecurrenceFormulaUsage.js +24 -2
  156. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.d.ts.map +1 -1
  157. package/lib/exercises/math/sequences/arithmetic/arithmeticThresholdFind.js +31 -8
  158. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -1
  159. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  160. package/lib/exercises/math/sequences/arithmetic/index.js +1 -1
  161. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.d.ts.map +1 -1
  162. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +11 -1
  163. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstRankOne.js +5 -5
  164. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -1
  165. package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +3 -1
  166. package/lib/exercises/math/sequences/geometric/geometricFindReason.d.ts.map +1 -1
  167. package/lib/exercises/math/sequences/geometric/geometricFindReason.js +41 -2
  168. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.d.ts.map +1 -1
  169. package/lib/exercises/math/sequences/geometric/geometricRecurrenceFormulaUsage.js +28 -2
  170. package/lib/exercises/math/sequences/sequenceEvaluation.d.ts.map +1 -1
  171. package/lib/exercises/math/sequences/sequenceEvaluation.js +22 -2
  172. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts +9 -0
  173. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.d.ts.map +1 -0
  174. package/lib/exercises/math/trigonometry/circle/areReelsOnTheSameTrigoCirclePoint.js +107 -0
  175. package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts +10 -0
  176. package/lib/exercises/math/trigonometry/circle/associatePoint.d.ts.map +1 -0
  177. package/lib/exercises/math/trigonometry/circle/associatePoint.js +86 -0
  178. package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts +10 -0
  179. package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.d.ts.map +1 -0
  180. package/lib/exercises/math/trigonometry/circle/associateReelToTrigoCirclePoint.js +205 -0
  181. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts +7 -0
  182. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.d.ts.map +1 -0
  183. package/lib/exercises/math/trigonometry/circle/findAngleFromCosAndSin.js +121 -0
  184. package/lib/exercises/math/trigonometry/circle/index.d.ts +7 -0
  185. package/lib/exercises/math/trigonometry/circle/index.d.ts.map +1 -0
  186. package/lib/exercises/math/trigonometry/circle/index.js +7 -0
  187. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts +10 -0
  188. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.d.ts.map +1 -0
  189. package/lib/exercises/math/trigonometry/circle/mainAngleMeasure.js +100 -0
  190. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts +8 -0
  191. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.d.ts.map +1 -0
  192. package/lib/exercises/math/trigonometry/circle/mainRemarkableValues.js +97 -0
  193. package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts +10 -0
  194. package/lib/exercises/math/trigonometry/circle/remarkableValues.d.ts.map +1 -0
  195. package/lib/exercises/math/trigonometry/circle/remarkableValues.js +112 -0
  196. package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts +7 -0
  197. package/lib/exercises/math/trigonometry/functions/basicEquationCos.d.ts.map +1 -0
  198. package/lib/exercises/math/trigonometry/functions/basicEquationCos.js +92 -0
  199. package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts +7 -0
  200. package/lib/exercises/math/trigonometry/functions/basicEquationSin.d.ts.map +1 -0
  201. package/lib/exercises/math/trigonometry/functions/basicEquationSin.js +104 -0
  202. package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts +7 -0
  203. package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.d.ts.map +1 -0
  204. package/lib/exercises/math/trigonometry/functions/basicTrigoSystemEquation.js +83 -0
  205. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts +8 -0
  206. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.d.ts.map +1 -0
  207. package/lib/exercises/math/trigonometry/functions/equationCosOnRandomInterval.js +111 -0
  208. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts +8 -0
  209. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.d.ts.map +1 -0
  210. package/lib/exercises/math/trigonometry/functions/equationSinOnRandomInterval.js +101 -0
  211. package/lib/exercises/math/trigonometry/functions/index.d.ts +6 -0
  212. package/lib/exercises/math/trigonometry/functions/index.d.ts.map +1 -0
  213. package/lib/exercises/math/trigonometry/functions/index.js +6 -0
  214. package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts +9 -0
  215. package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.d.ts.map +1 -0
  216. package/lib/exercises/math/trigonometry/functions/trigoAssociateAngle.js +151 -0
  217. package/lib/exercises/math/trigonometry/index.d.ts +3 -14
  218. package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
  219. package/lib/exercises/math/trigonometry/index.js +3 -14
  220. package/lib/exercises/math/trigonometry/triangle/index.d.ts +7 -0
  221. package/lib/exercises/math/trigonometry/triangle/index.d.ts.map +1 -0
  222. package/lib/exercises/math/trigonometry/triangle/index.js +6 -0
  223. package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts +10 -0
  224. package/lib/exercises/math/trigonometry/triangle/trigonometry.d.ts.map +1 -0
  225. package/lib/exercises/math/trigonometry/triangle/trigonometry.js +207 -0
  226. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts +10 -0
  227. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.d.ts.map +1 -0
  228. package/lib/exercises/math/trigonometry/triangle/trigonometryAngleCalcul.js +174 -0
  229. package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts +11 -0
  230. package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.d.ts.map +1 -0
  231. package/lib/exercises/math/trigonometry/triangle/trigonometrySideCalcul.js +224 -0
  232. package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts +13 -0
  233. package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.d.ts.map +1 -0
  234. package/lib/exercises/math/trigonometry/triangle/trigonometrySideName.js +189 -0
  235. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts +13 -0
  236. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.d.ts.map +1 -0
  237. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaCalcul.js +290 -0
  238. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts +18 -0
  239. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.d.ts.map +1 -0
  240. package/lib/exercises/math/trigonometry/triangle/trigonometrySohcahtoaUse.js +386 -0
  241. package/lib/exercises/pc/mathExosInPC.d.ts +2 -2
  242. package/lib/exercises/pc/mathExosInPC.d.ts.map +1 -1
  243. package/lib/exercises/pc/mathExosInPC.js +2 -2
  244. package/lib/index.d.ts +63 -27
  245. package/lib/index.d.ts.map +1 -1
  246. package/lib/math/geometry/segment.d.ts +1 -1
  247. package/lib/math/geometry/vector.d.ts +2 -1
  248. package/lib/math/geometry/vector.d.ts.map +1 -1
  249. package/lib/math/geometry/vector.js +1 -1
  250. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  251. package/lib/math/numbers/reals/real.js +2 -0
  252. package/lib/playground.d.ts.map +1 -1
  253. package/lib/playground.js +3 -1
  254. package/lib/tree/nodes/algebraicNode.d.ts +1 -0
  255. package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
  256. package/lib/tree/nodes/functions/sqrtNode.d.ts +2 -1
  257. package/lib/tree/nodes/functions/sqrtNode.d.ts.map +1 -1
  258. package/lib/tree/nodes/functions/sqrtNode.js +17 -6
  259. package/lib/tree/nodes/operators/multiplyNode.js +1 -1
  260. package/package.json +1 -1
@@ -0,0 +1,114 @@
1
+ import { addValidProp, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { DecimalConstructor } from "../../../../math/numbers/decimals/decimal.js";
4
+ import { frenchify } from "../../../../math/utils/latex/frenchify.js";
5
+ import { randint } from "../../../../math/utils/random/randint.js";
6
+ import { round } from "../../../../math/utils/round.js";
7
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
9
+ import { shuffle } from "../../../../utils/alea/shuffle.js";
10
+ const getInstruction = (identifiers) => {
11
+ const { pA, pB, pUnion } = identifiers;
12
+ return `Soient deux événements $A$ et $B$ tels que $P(A) = ${frenchify(pA)}$, $P(B) = ${frenchify(pB)}$ et $P(A\\cup B) = ${frenchify(pUnion)}$.
13
+
14
+ Les événements $A$ et $B$ sont-ils indépendants ?`;
15
+ };
16
+ const getHint = () => {
17
+ return `Deux évènements $M$ et $N$ sont indépendants si et seulement si :
18
+
19
+ $$
20
+ P(M\\cap N) = P(M)\\times P(N)
21
+ $$
22
+
23
+ D'autre part, on rappelle la formule de l'union :
24
+
25
+ $$
26
+ P(A \\cup B) = P(A) + P(B) - P(A \\cap B)
27
+ $$`;
28
+ };
29
+ const getCorrection = (identifiers) => {
30
+ const { pA, pB, pUnion } = identifiers;
31
+ const isInde = getAnswer(identifiers) === "Oui";
32
+ return `On sait que :
33
+
34
+ $$
35
+ P(A \\cup B) = P(A) + P(B) - P(A \\cap B)
36
+ $$
37
+
38
+ On a donc :
39
+
40
+ $$
41
+ P(A \\cap B) = P(A) + P(B) - P(A \\cup B) = ${round(pA + pB - pUnion, 5).frenchify()}
42
+ $$
43
+
44
+ D'autre part,
45
+
46
+ $$
47
+ P(A)\\times P(B) = ${multiply(pA, pB).toTex()} = ${round(pA * pB, 5).frenchify()}
48
+ $$
49
+
50
+ ${isInde
51
+ ? `Puisque $P(A\\cap B) = P(A)\\times P(B)$, les évènements $A$ et $B$ sont bien indépendants.`
52
+ : `Puisque $P(A\\cap B) \\neq P(A)\\times P(B)$, les évènements $A$ et $B$ ne sont pas indépendants.`}
53
+ `;
54
+ };
55
+ const getAnswer = (identifiers) => {
56
+ const { pA, pB, pUnion } = identifiers;
57
+ return Math.abs(pA + pB - pA * pB - pUnion) < 0.0001 ? "Oui" : "Non";
58
+ };
59
+ const getIndependancyQuestion = () => {
60
+ const pA = DecimalConstructor.random(0, 1, randint(1, 3));
61
+ const pB = DecimalConstructor.random(0, 1, randint(1, 3));
62
+ const areIndependants = coinFlip();
63
+ let pUnion;
64
+ const unionValueIfIndependants = round(pA.value + pB.value - pA.value * pB.value, 5);
65
+ if (areIndependants)
66
+ pUnion = unionValueIfIndependants;
67
+ else {
68
+ let counter = 0;
69
+ do {
70
+ counter++;
71
+ if (counter > 1000)
72
+ throw new Error("Too many iterations in independancy");
73
+ pUnion = DecimalConstructor.random(0, 1, randint(1, 3)).value;
74
+ } while ((pUnion < pA.value && pUnion < pB.value) ||
75
+ pUnion === unionValueIfIndependants ||
76
+ pUnion > pA.value + pB.value);
77
+ }
78
+ const identifiers = { pA: pA.value, pB: pB.value, pUnion };
79
+ return getQuestionFromIdentifiers(identifiers);
80
+ };
81
+ const getQuestionFromIdentifiers = (identifiers) => {
82
+ const question = {
83
+ answer: getAnswer(identifiers),
84
+ instruction: getInstruction(identifiers),
85
+ keys: [],
86
+ answerFormat: "raw",
87
+ identifiers,
88
+ hint: getHint(identifiers),
89
+ correction: getCorrection(identifiers),
90
+ };
91
+ return question;
92
+ };
93
+ const getPropositions = (_n, { answer }) => {
94
+ const propositions = [];
95
+ addValidProp(propositions, answer, "raw");
96
+ tryToAddWrongProp(propositions, "Oui", "raw");
97
+ tryToAddWrongProp(propositions, "Non", "raw");
98
+ tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
99
+ return shuffle(propositions);
100
+ };
101
+ export const independancy = {
102
+ id: "independancy",
103
+ connector: "=",
104
+ label: "Déterminer l'indépendance de deux événements en connaissant $P(A)$, $P(B)$ et $P(A\\cup B)$",
105
+ isSingleStep: true,
106
+ generator: (nb) => getDistinctQuestions(getIndependancyQuestion, nb),
107
+ qcmTimer: 60,
108
+ freeTimer: 60,
109
+ getPropositions,
110
+ answerType: "QCU",
111
+ subject: "Mathématiques",
112
+ getQuestionFromIdentifiers,
113
+ hasHintAndCorrection: true,
114
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ pAIds: NodeIdentifiers;
5
+ pBIds: NodeIdentifiers;
6
+ };
7
+ export declare const independancyFindCap: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=independancyFindCap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"independancyFindCap.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/independancy/independancyFindCap.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAM7C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AAuFF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
@@ -0,0 +1,101 @@
1
+ import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
4
+ import { randfloat } from "../../../../math/utils/random/randfloat.js";
5
+ import { randint } from "../../../../math/utils/random/randint.js";
6
+ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
7
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
8
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
9
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
10
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
11
+ const getPropositions = (n, { answer, ...identifiers }) => {
12
+ const propositions = [];
13
+ const { pAIds, pBIds } = identifiers;
14
+ const pA = reifyAlgebraic(pAIds);
15
+ const pB = reifyAlgebraic(pBIds);
16
+ addValidProp(propositions, answer);
17
+ tryToAddWrongProp(propositions, add(pA, pB).simplify().toTex());
18
+ propWhile(propositions, n, () => {
19
+ tryToAddWrongProp(propositions, randfloat(0, 1, randint(1, 3)).frenchify());
20
+ });
21
+ return shuffleProps(propositions, n);
22
+ };
23
+ const getAnswer = (identifiers) => {
24
+ const { pAIds, pBIds } = identifiers;
25
+ const pA = reifyAlgebraic(pAIds);
26
+ const pB = reifyAlgebraic(pBIds);
27
+ return multiply(pA, pB).simplify().toTex();
28
+ };
29
+ const getInstruction = (identifiers) => {
30
+ const { pAIds, pBIds } = identifiers;
31
+ const pA = reifyAlgebraic(pAIds);
32
+ const pB = reifyAlgebraic(pBIds);
33
+ return `On considère deux événements indépendants $A$ et $B$, tels que $P(A) = ${pA.toTex()}$ et $P(B) = ${pB.toTex()}$.
34
+
35
+ Déterminer $P(A\\cap B)$.`;
36
+ };
37
+ const getHint = () => {
38
+ return `Deux événements $A$ et $B$ sont indépendants si et seulement si $P(A)\\times P(B) = P(A\\cap B)$.`;
39
+ };
40
+ const getCorrection = (identifiers) => {
41
+ const { pAIds, pBIds } = identifiers;
42
+ const pA = reifyAlgebraic(pAIds);
43
+ const pB = reifyAlgebraic(pBIds);
44
+ return `Puisque $A$ et $B$ sont indépendants, alors on a :
45
+
46
+ ${alignTex([
47
+ ["P(A\\cap B)", "=", "P(A)\\times P(B)"],
48
+ ["", "=", multiply(pA, pB).toTex()],
49
+ ["", "=", getAnswer(identifiers)],
50
+ ])}
51
+ `;
52
+ };
53
+ const getKeys = () => {
54
+ return [];
55
+ };
56
+ const isAnswerValid = (ans, { answer }) => {
57
+ try {
58
+ return numberVEA(ans, answer);
59
+ }
60
+ catch (err) {
61
+ return handleVEAError(err);
62
+ }
63
+ };
64
+ const getIndependancyFindCapQuestion = () => {
65
+ const pA = randfloat(0, 1, randint(1, 3));
66
+ const pB = randfloat(0, 1, randint(1, 3));
67
+ const identifiers = {
68
+ pAIds: pA.toTree().toIdentifiers(),
69
+ pBIds: pB.toTree().toIdentifiers(),
70
+ };
71
+ return getQuestionFromIdentifiers(identifiers);
72
+ };
73
+ const getQuestionFromIdentifiers = (identifiers) => {
74
+ return {
75
+ answer: getAnswer(identifiers),
76
+ instruction: getInstruction(identifiers),
77
+ keys: getKeys(identifiers),
78
+ answerFormat: "tex",
79
+ identifiers,
80
+ hint: getHint(identifiers),
81
+ correction: getCorrection(identifiers),
82
+ };
83
+ };
84
+ export const independancyFindCap = {
85
+ id: "independancyFindCap",
86
+ connector: "=",
87
+ label: "Calculer l'intersection de deux événements indépendants",
88
+ isSingleStep: true,
89
+ generator: (nb, opts) => getDistinctQuestions(() => getIndependancyFindCapQuestion(opts), nb),
90
+ qcmTimer: 60,
91
+ freeTimer: 60,
92
+ getPropositions,
93
+ isAnswerValid,
94
+ subject: "Mathématiques",
95
+ getInstruction,
96
+ getHint,
97
+ getCorrection,
98
+ getAnswer,
99
+ getQuestionFromIdentifiers,
100
+ hasHintAndCorrection: true,
101
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ pAIds: NodeIdentifiers;
5
+ pBIds: NodeIdentifiers;
6
+ };
7
+ export declare const independancyFindCup: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=independancyFindCup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"independancyFindCup.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/independancy/independancyFindCup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAO7C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AAuGF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
@@ -0,0 +1,118 @@
1
+ import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
4
+ import { randfloat } from "../../../../math/utils/random/randfloat.js";
5
+ import { randint } from "../../../../math/utils/random/randint.js";
6
+ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
7
+ import { add } from "../../../../tree/nodes/operators/addNode.js";
8
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
9
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
10
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
11
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
12
+ const getPropositions = (n, { answer, ...identifiers }) => {
13
+ const propositions = [];
14
+ const { pAIds, pBIds } = identifiers;
15
+ const pA = reifyAlgebraic(pAIds);
16
+ const pB = reifyAlgebraic(pBIds);
17
+ addValidProp(propositions, answer);
18
+ tryToAddWrongProp(propositions, multiply(pA, pB).simplify().toTex());
19
+ propWhile(propositions, n, () => {
20
+ tryToAddWrongProp(propositions, randfloat(0, 1, randint(1, 3)).frenchify());
21
+ });
22
+ return shuffleProps(propositions, n);
23
+ };
24
+ const getAnswer = (identifiers) => {
25
+ const { pAIds, pBIds } = identifiers;
26
+ const pA = reifyAlgebraic(pAIds);
27
+ const pB = reifyAlgebraic(pBIds);
28
+ return substract(add(pA, pB), multiply(pA, pB)).simplify().toTex();
29
+ };
30
+ const getInstruction = (identifiers) => {
31
+ const { pAIds, pBIds } = identifiers;
32
+ const pA = reifyAlgebraic(pAIds);
33
+ const pB = reifyAlgebraic(pBIds);
34
+ return `On considère deux événements indépendants $A$ et $B$, tels que $P(A) = ${pA.toTex()}$ et $P(B) = ${pB.toTex()}$.
35
+
36
+ Déterminer $P(A\\cup B)$.`;
37
+ };
38
+ const getHint = () => {
39
+ return `Deux événements $A$ et $B$ sont indépendants si et seulement si $P(A)\\times P(B) = P(A\\cap B)$.
40
+
41
+ D'autre part, on rappelle la formule de l'union :
42
+
43
+ $$
44
+ P(A \\cup B) = P(A) + P(B) - P(A \\cap B)
45
+ $$`;
46
+ };
47
+ const getCorrection = (identifiers) => {
48
+ const { pAIds, pBIds } = identifiers;
49
+ const pA = reifyAlgebraic(pAIds);
50
+ const pB = reifyAlgebraic(pBIds);
51
+ const pAB = multiply(pA, pB);
52
+ const pABSimp = pAB.simplify();
53
+ return `Puisque $A$ et $B$ sont indépendants, alors on a :
54
+
55
+ ${alignTex([
56
+ ["P(A\\cap B)", "=", "P(A)\\times P(B)"],
57
+ ["", "=", pAB.toTex()],
58
+ ["", "=", pABSimp.toTex()],
59
+ ])}
60
+
61
+ On utilise ensuite la formule de l'union :
62
+
63
+ ${alignTex([
64
+ ["P(A \\cup B)", "=", "P(A) + P(B) - P(A \\cap B)"],
65
+ ["", "=", substract(add(pA, pB), pABSimp).toTex()],
66
+ ["", "=", substract(add(pA, pB), pABSimp).simplify().toTex()],
67
+ ])}
68
+ `;
69
+ };
70
+ const getKeys = () => {
71
+ return [];
72
+ };
73
+ const isAnswerValid = (ans, { answer }) => {
74
+ try {
75
+ return numberVEA(ans, answer);
76
+ }
77
+ catch (err) {
78
+ return handleVEAError(err);
79
+ }
80
+ };
81
+ const getIndependancyFindCupQuestion = () => {
82
+ const pA = randfloat(0, 1, randint(1, 3));
83
+ const pB = randfloat(0, 1, randint(1, 3));
84
+ const identifiers = {
85
+ pAIds: pA.toTree().toIdentifiers(),
86
+ pBIds: pB.toTree().toIdentifiers(),
87
+ };
88
+ return getQuestionFromIdentifiers(identifiers);
89
+ };
90
+ const getQuestionFromIdentifiers = (identifiers) => {
91
+ return {
92
+ answer: getAnswer(identifiers),
93
+ instruction: getInstruction(identifiers),
94
+ keys: getKeys(identifiers),
95
+ answerFormat: "tex",
96
+ identifiers,
97
+ hint: getHint(identifiers),
98
+ correction: getCorrection(identifiers),
99
+ };
100
+ };
101
+ export const independancyFindCup = {
102
+ id: "independancyFindCup",
103
+ connector: "=",
104
+ label: "Calculer l'union de deux événements indépendants",
105
+ isSingleStep: true,
106
+ generator: (nb, opts) => getDistinctQuestions(() => getIndependancyFindCupQuestion(opts), nb),
107
+ qcmTimer: 60,
108
+ freeTimer: 60,
109
+ getPropositions,
110
+ isAnswerValid,
111
+ subject: "Mathématiques",
112
+ getInstruction,
113
+ getHint,
114
+ getCorrection,
115
+ getAnswer,
116
+ getQuestionFromIdentifiers,
117
+ hasHintAndCorrection: true,
118
+ };
@@ -0,0 +1,5 @@
1
+ export * from "./independancy.js";
2
+ export * from "./isIndependantFromDefinition.js";
3
+ export * from "./independancyFindCap.js";
4
+ export * from "./independancyFindCup.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/independancy/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./independancy.js";
2
+ export * from "./isIndependantFromDefinition.js";
3
+ export * from "./independancyFindCap.js";
4
+ export * from "./independancyFindCup.js";
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ import { NodeIdentifiers } from "../../../../tree/nodes/nodeConstructor.js";
3
+ type Identifiers = {
4
+ pAIds: NodeIdentifiers;
5
+ pBIds: NodeIdentifiers;
6
+ pABIds: NodeIdentifiers;
7
+ };
8
+ export declare const isIndependantFromDefinition: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=isIndependantFromDefinition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isIndependantFromDefinition.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/independancy/isIndependantFromDefinition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EACL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAK7C,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,eAAe,CAAC;IACvB,MAAM,EAAE,eAAe,CAAC;CACzB,CAAC;AA8FF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAqB7D,CAAC"}
@@ -0,0 +1,106 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { randfloat } from "../../../../math/utils/random/randfloat.js";
4
+ import { randint } from "../../../../math/utils/random/randint.js";
5
+ import { round } from "../../../../math/utils/round.js";
6
+ import { reifyAlgebraic, } from "../../../../tree/nodes/nodeConstructor.js";
7
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
8
+ import { substract } from "../../../../tree/nodes/operators/substractNode.js";
9
+ import { coinFlip } from "../../../../utils/alea/coinFlip.js";
10
+ const getPropositions = (n, { answer }) => {
11
+ const propositions = [];
12
+ addValidProp(propositions, answer);
13
+ tryToAddWrongProp(propositions, "Oui", "raw");
14
+ tryToAddWrongProp(propositions, "Non", "raw");
15
+ tryToAddWrongProp(propositions, "On ne peut pas savoir", "raw");
16
+ return shuffleProps(propositions, n);
17
+ };
18
+ const getAnswer = (identifiers) => {
19
+ const { pABIds, pAIds, pBIds } = identifiers;
20
+ const pA = reifyAlgebraic(pAIds);
21
+ const pB = reifyAlgebraic(pBIds);
22
+ const pAB = reifyAlgebraic(pABIds);
23
+ return Math.abs(substract(pAB, multiply(pA, pB)).evaluate()) < 0.0001
24
+ ? "Oui"
25
+ : "Non";
26
+ };
27
+ const getInstruction = (identifiers) => {
28
+ const { pABIds, pAIds, pBIds } = identifiers;
29
+ const pA = reifyAlgebraic(pAIds);
30
+ const pB = reifyAlgebraic(pBIds);
31
+ const pAB = reifyAlgebraic(pABIds);
32
+ return `On considère deux événements $A$ et $B$ tels que $P(A)= ${pA.toTex()}$, $P(B)=${pB.toTex()}$ et $P(A\\cap B) = ${pAB.toTex()}$.
33
+
34
+ Les événements $A$ et $B$ sont-ils indépendants ?`;
35
+ };
36
+ const getHint = () => {
37
+ return `Deux événements sont indépendants si et seulement si :
38
+
39
+ $$
40
+ P(A\\cap B) = P(A)\\times P(B)
41
+ $$`;
42
+ };
43
+ const getCorrection = (identifiers) => {
44
+ const { pAIds, pBIds } = identifiers;
45
+ const pA = reifyAlgebraic(pAIds);
46
+ const pB = reifyAlgebraic(pBIds);
47
+ const isIndependant = getAnswer(identifiers) === "Oui";
48
+ return `Deux événements sont indépendants si et seulement si :
49
+
50
+ $$
51
+ P(A\\cap B) = P(A)\\times P(B)
52
+ $$
53
+
54
+ Ici, on a :
55
+
56
+ $$
57
+ P(A)\\times P(B) = ${multiply(pA, pB).toSimplificationTex()}
58
+ $$
59
+
60
+ ${isIndependant
61
+ ? `Puisque $P(A\\cap B) = P(A)\\times P(B)$, les évènements $A$ et $B$ sont bien indépendants.`
62
+ : `Puisque $P(A\\cap B) \\neq P(A)\\times P(B)$, les évènements $A$ et $B$ ne sont pas indépendants.`}
63
+ `;
64
+ };
65
+ const getIsIndependantFromDefinitionQuestion = () => {
66
+ const pA = randfloat(0.1, 1, randint(1, 3));
67
+ const pB = randfloat(0.1, 1, randint(1, 3));
68
+ const isInde = coinFlip();
69
+ const pAB = isInde
70
+ ? round(pA * pB, 5)
71
+ : randfloat(0, Math.min(pA, pB), randint(1, 3), [round(pA * pB, 5)]);
72
+ const identifiers = {
73
+ pAIds: pA.toTree().toIdentifiers(),
74
+ pABIds: pAB.toTree().toIdentifiers(),
75
+ pBIds: pB.toTree().toIdentifiers(),
76
+ };
77
+ return getQuestionFromIdentifiers(identifiers);
78
+ };
79
+ const getQuestionFromIdentifiers = (identifiers) => {
80
+ return {
81
+ answer: getAnswer(identifiers),
82
+ instruction: getInstruction(identifiers),
83
+ keys: [],
84
+ answerFormat: "raw",
85
+ identifiers,
86
+ hint: getHint(identifiers),
87
+ correction: getCorrection(identifiers),
88
+ };
89
+ };
90
+ export const isIndependantFromDefinition = {
91
+ id: "isIndependantFromDefinition",
92
+ label: "Déterminer si deux événements sont indépendants en comparant $P(A\\cap B)$ et $P(A)\\times P(B)$",
93
+ isSingleStep: true,
94
+ generator: (nb, opts) => getDistinctQuestions(() => getIsIndependantFromDefinitionQuestion(opts), nb),
95
+ qcmTimer: 60,
96
+ freeTimer: 60,
97
+ getPropositions,
98
+ subject: "Mathématiques",
99
+ getInstruction,
100
+ getHint,
101
+ getCorrection,
102
+ getAnswer,
103
+ getQuestionFromIdentifiers,
104
+ hasHintAndCorrection: true,
105
+ answerType: "QCU",
106
+ };
@@ -2,7 +2,7 @@ export * from "./conditionalProbability.js";
2
2
  export * from "./probabilityTree.js";
3
3
  export * from "./stats1var/index.js";
4
4
  export * from "./stats2var/index.js";
5
- export * from "./independancy.js";
5
+ export * from "./independancy/index.js";
6
6
  export * from "./issuesCountingForCards.js";
7
7
  export * from "./probaFromTableNoContext.js";
8
8
  export * from "./probaFromTableWithContext.js";
@@ -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,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,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"}
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,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"}
@@ -2,7 +2,7 @@ export * from "./conditionalProbability.js";
2
2
  export * from "./probabilityTree.js";
3
3
  export * from "./stats1var/index.js";
4
4
  export * from "./stats2var/index.js";
5
- export * from "./independancy.js";
5
+ export * from "./independancy/index.js";
6
6
  export * from "./issuesCountingForCards.js";
7
7
  export * from "./probaFromTableNoContext.js";
8
8
  export * from "./probaFromTableWithContext.js";
@@ -18,7 +18,7 @@ const getPropositions = (n, { answer }) => {
18
18
  const getAnswer = (identifiers) => {
19
19
  const { xValuesIds, yValuesIds } = identifiers;
20
20
  const va = new RandomVariable(xValuesIds.map((e) => reifyAlgebraic(e)), yValuesIds.map((e) => reifyAlgebraic(e)));
21
- return round(va.getStandardDeviation().simplify().evaluate(), 2).frenchify();
21
+ return round(va.getStandardDeviation().evaluate(), 2).frenchify();
22
22
  };
23
23
  const getInstruction = (identifiers) => {
24
24
  const { xValuesIds, yValuesIds } = identifiers;
@@ -1 +1 @@
1
- {"version":3,"file":"headsOrTailsTwiceOutcomes.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAS9B,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAsNF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
1
+ {"version":3,"file":"headsOrTailsTwiceOutcomes.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceOutcomes.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAS9B,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AA6NF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
@@ -158,6 +158,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
158
158
  firstCellIsDivided: true,
159
159
  },
160
160
  },
161
+ correctionStyle: {
162
+ tableOptions: {
163
+ firstCellIsDivided: true,
164
+ firstColumnIsHeader: true,
165
+ firstRowIsHeader: true,
166
+ },
167
+ },
161
168
  };
162
169
  return question;
163
170
  };
@@ -1 +1 @@
1
- {"version":3,"file":"headsOrTailsTwiceProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAY9B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAuLF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
1
+ {"version":3,"file":"headsOrTailsTwiceProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/headsOrTailsTwiceProbas.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAY9B,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA8LF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
@@ -137,6 +137,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
137
137
  identifiers,
138
138
  hint: getHint(identifiers),
139
139
  correction: getCorrection(identifiers),
140
+ correctionStyle: {
141
+ tableOptions: {
142
+ firstCellIsDivided: true,
143
+ firstColumnIsHeader: true,
144
+ firstRowIsHeader: true,
145
+ },
146
+ },
140
147
  };
141
148
  return question;
142
149
  };
@@ -1 +1 @@
1
- {"version":3,"file":"numberPoolTwiceProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAiB9B,KAAK,WAAW,GAAG;IAEjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA6NF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
1
+ {"version":3,"file":"numberPoolTwiceProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/numberPoolTwiceProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAiB9B,KAAK,WAAW,GAAG;IAEjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAoOF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
@@ -171,6 +171,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
171
171
  identifiers,
172
172
  hint: getHint(identifiers),
173
173
  correction: getCorrection(identifiers),
174
+ correctionStyle: {
175
+ tableOptions: {
176
+ firstCellIsDivided: true,
177
+ firstColumnIsHeader: true,
178
+ firstRowIsHeader: true,
179
+ },
180
+ },
174
181
  };
175
182
  return question;
176
183
  };
@@ -1 +1 @@
1
- {"version":3,"file":"twoStepExperimentProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AA0B9B,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CACpB,CAAC;AAijBF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
1
+ {"version":3,"file":"twoStepExperimentProbas.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/twoStepExperiments/twoStepExperimentProbas.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AA0B9B,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;CACpB,CAAC;AAwjBF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
@@ -442,6 +442,13 @@ const getQuestionFromIdentifiers = (identifiers) => {
442
442
  identifiers,
443
443
  hint: getHint(identifiers),
444
444
  correction: getCorrection(identifiers),
445
+ correctionStyle: {
446
+ tableOptions: {
447
+ firstCellIsDivided: true,
448
+ firstColumnIsHeader: true,
449
+ firstRowIsHeader: true,
450
+ },
451
+ },
445
452
  };
446
453
  return question;
447
454
  };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ firstValue: number;
4
+ reason: number;
5
+ firstRank: number;
6
+ };
7
+ export declare const arithmeticFindExplicitFormulaFirstTermRandom: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=arithmeticFindExplicitFormulaFirstTermRandom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arithmeticFindExplicitFormulaFirstTermRandom.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormulaFirstTermRandom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAyHF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAoB5E,CAAC"}