math-exercises 2.2.3 → 2.2.5

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 (500) hide show
  1. package/lib/exercises/exercise.d.ts +2 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/digitDecimalRank.js +4 -4
  4. package/lib/exercises/math/calcul/digitRank.js +4 -4
  5. package/lib/exercises/math/calcul/digitRankNumber.d.ts +8 -0
  6. package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -0
  7. package/lib/exercises/math/calcul/digitRankNumber.js +57 -0
  8. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
  9. package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +34 -0
  10. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
  11. package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +17 -0
  12. package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
  13. package/lib/exercises/math/calcul/fractions/fractionsDivision.js +23 -0
  14. package/lib/exercises/math/calcul/fractions/fractionsProduct.d.ts.map +1 -1
  15. package/lib/exercises/math/calcul/fractions/fractionsProduct.js +15 -0
  16. package/lib/exercises/math/calcul/index.d.ts +1 -0
  17. package/lib/exercises/math/calcul/index.d.ts.map +1 -1
  18. package/lib/exercises/math/calcul/index.js +1 -0
  19. package/lib/exercises/math/calcul/proportionality/index.d.ts +2 -0
  20. package/lib/exercises/math/calcul/proportionality/index.d.ts.map +1 -1
  21. package/lib/exercises/math/calcul/proportionality/index.js +2 -0
  22. package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts +9 -0
  23. package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -0
  24. package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +90 -0
  25. package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts +9 -0
  26. package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts.map +1 -0
  27. package/lib/exercises/math/calcul/proportionality/scaleUsage.js +95 -0
  28. package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
  29. package/lib/exercises/math/calcul/rounding/rounding.js +18 -0
  30. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
  31. package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -0
  32. package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts +7 -0
  33. package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -0
  34. package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +60 -0
  35. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
  36. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +31 -1
  37. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts +9 -0
  38. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -0
  39. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +86 -0
  40. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
  41. package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +21 -2
  42. package/lib/exercises/math/calculLitteral/distributivity/index.d.ts +2 -0
  43. package/lib/exercises/math/calculLitteral/distributivity/index.d.ts.map +1 -1
  44. package/lib/exercises/math/calculLitteral/distributivity/index.js +2 -0
  45. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
  46. package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +23 -2
  47. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
  48. package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +17 -2
  49. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
  50. package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +21 -2
  51. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
  52. package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +26 -1
  53. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
  54. package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +18 -2
  55. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
  56. package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +19 -2
  57. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
  58. package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +15 -2
  59. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
  60. package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +20 -5
  61. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
  62. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +24 -1
  63. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
  64. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +20 -1
  65. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
  66. package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +19 -3
  67. package/lib/exercises/math/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
  68. package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +24 -8
  69. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
  70. package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +21 -2
  71. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
  72. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +24 -4
  73. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
  74. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +25 -5
  75. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
  76. package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +19 -0
  77. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
  78. package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +1 -0
  79. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts +8 -0
  80. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -0
  81. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +77 -0
  82. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts +8 -0
  83. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -0
  84. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +80 -0
  85. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +2 -0
  86. package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
  87. package/lib/exercises/math/calculLitteral/factorisation/index.js +2 -0
  88. package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
  89. package/lib/exercises/math/conversion/lengthConversion.js +18 -4
  90. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
  91. package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -0
  92. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts +10 -0
  93. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -0
  94. package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +81 -0
  95. package/lib/exercises/math/functions/affines/index.d.ts +1 -0
  96. package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
  97. package/lib/exercises/math/functions/affines/index.js +1 -0
  98. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
  99. package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +12 -2
  100. package/lib/exercises/math/functions/trinoms/index.d.ts +2 -0
  101. package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
  102. package/lib/exercises/math/functions/trinoms/index.js +2 -0
  103. package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts +5 -0
  104. package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts.map +1 -0
  105. package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.js +44 -0
  106. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts +9 -0
  107. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -0
  108. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +134 -0
  109. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts +7 -0
  110. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts.map +1 -0
  111. package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +59 -0
  112. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
  113. package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +1 -0
  114. package/lib/exercises/math/index.d.ts +1 -0
  115. package/lib/exercises/math/index.d.ts.map +1 -1
  116. package/lib/exercises/math/index.js +1 -0
  117. package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
  118. package/lib/exercises/math/percent/applyPercent.js +20 -2
  119. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts +11 -0
  120. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -0
  121. package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +49 -0
  122. package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
  123. package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
  124. package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
  125. package/lib/exercises/math/spaceGeometry/index.d.ts +2 -0
  126. package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -0
  127. package/lib/exercises/math/spaceGeometry/index.js +17 -0
  128. package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +4 -0
  129. package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -0
  130. package/lib/exercises/math/spaceGeometry/vectors/index.js +19 -0
  131. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts +5 -0
  132. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -0
  133. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +52 -0
  134. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts +5 -0
  135. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts.map +1 -0
  136. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.js +62 -0
  137. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts +9 -0
  138. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -0
  139. package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +54 -0
  140. package/lib/exercises/math/squareRoots/squareRootIdentities.js +3 -3
  141. package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
  142. package/lib/exercises/math/suites/sequencePlot.js +1 -2
  143. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
  144. package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -0
  145. package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
  146. package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -1
  147. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts +1 -1
  148. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts.map +1 -1
  149. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  150. package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts +1 -1
  151. package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts.map +1 -1
  152. package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +3 -3
  153. package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.d.ts.map +1 -1
  154. package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.js +29 -4
  155. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts +1 -1
  156. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
  157. package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +6 -6
  158. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts +1 -1
  159. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
  160. package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +2 -1
  161. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts +1 -1
  162. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts.map +1 -1
  163. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
  164. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts +1 -1
  165. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts.map +1 -1
  166. package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
  167. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts +1 -1
  168. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts.map +1 -1
  169. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
  170. package/lib/exercises/pc/chemicalElements/index.d.ts +1 -0
  171. package/lib/exercises/pc/chemicalElements/index.d.ts.map +1 -1
  172. package/lib/exercises/pc/chemicalElements/index.js +1 -0
  173. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts +11 -0
  174. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts.map +1 -0
  175. package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +100 -0
  176. package/lib/exercises/pc/chemicalEquations.d.ts +1 -1
  177. package/lib/exercises/pc/chemicalEquations.d.ts.map +1 -1
  178. package/lib/exercises/pc/chemicalEquations.js +1 -1
  179. package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -1
  180. package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +1 -0
  181. package/lib/exercises/pc/chemicalReactions/index.d.ts +2 -0
  182. package/lib/exercises/pc/chemicalReactions/index.d.ts.map +1 -1
  183. package/lib/exercises/pc/chemicalReactions/index.js +2 -0
  184. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts +5 -0
  185. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts.map +1 -0
  186. package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +69 -0
  187. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts +11 -0
  188. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts.map +1 -0
  189. package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +181 -0
  190. package/lib/exercises/pc/chemicalReactionsProduct.d.ts +1 -1
  191. package/lib/exercises/pc/chemicalReactionsProduct.d.ts.map +1 -1
  192. package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
  193. package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -1
  194. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +2 -1
  195. package/lib/exercises/pc/dosage/concentrationCalculation.d.ts +10 -0
  196. package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -0
  197. package/lib/exercises/pc/dosage/concentrationCalculation.js +119 -0
  198. package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts +10 -0
  199. package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -0
  200. package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +117 -0
  201. package/lib/exercises/pc/dosage/index.d.ts +2 -0
  202. package/lib/exercises/pc/dosage/index.d.ts.map +1 -1
  203. package/lib/exercises/pc/dosage/index.js +2 -0
  204. package/lib/exercises/pc/electricity/calculateIntensity.d.ts +8 -0
  205. package/lib/exercises/pc/electricity/calculateIntensity.d.ts.map +1 -0
  206. package/lib/exercises/pc/electricity/calculateIntensity.js +60 -0
  207. package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.d.ts +10 -0
  208. package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.d.ts.map +1 -0
  209. package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +105 -0
  210. package/lib/exercises/pc/electricity/calculateVoltage.d.ts +11 -0
  211. package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -0
  212. package/lib/exercises/pc/electricity/calculateVoltage.js +144 -0
  213. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts +9 -0
  214. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts.map +1 -0
  215. package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +81 -0
  216. package/lib/exercises/pc/electricity/index.d.ts +7 -0
  217. package/lib/exercises/pc/electricity/index.d.ts.map +1 -1
  218. package/lib/exercises/pc/electricity/index.js +7 -0
  219. package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.d.ts +10 -0
  220. package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.d.ts.map +1 -0
  221. package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +110 -0
  222. package/lib/exercises/pc/electricity/ohmLaw.d.ts +11 -0
  223. package/lib/exercises/pc/electricity/ohmLaw.d.ts.map +1 -0
  224. package/lib/exercises/pc/electricity/ohmLaw.js +123 -0
  225. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts +5 -0
  226. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -0
  227. package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +95 -0
  228. package/lib/exercises/pc/energy/calorificValue.d.ts +8 -0
  229. package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -0
  230. package/lib/exercises/pc/energy/calorificValue.js +78 -0
  231. package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts +8 -0
  232. package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -0
  233. package/lib/exercises/pc/energy/combustionTransferEnergy.js +78 -0
  234. package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts +11 -0
  235. package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -0
  236. package/lib/exercises/pc/energy/combustionTransferEnergy2.js +141 -0
  237. package/lib/exercises/pc/energy/efficencyOfConverter.d.ts +8 -0
  238. package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -0
  239. package/lib/exercises/pc/energy/efficencyOfConverter.js +84 -0
  240. package/lib/exercises/pc/energy/efficiencyCalculation.d.ts +10 -0
  241. package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -0
  242. package/lib/exercises/pc/energy/efficiencyCalculation.js +122 -0
  243. package/lib/exercises/pc/energy/energyTransfer.d.ts +10 -0
  244. package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -0
  245. package/lib/exercises/pc/energy/energyTransfer.js +67 -0
  246. package/lib/exercises/pc/energy/index.d.ts +9 -0
  247. package/lib/exercises/pc/energy/index.d.ts.map +1 -0
  248. package/lib/exercises/pc/energy/index.js +24 -0
  249. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts +10 -0
  250. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -0
  251. package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +168 -0
  252. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts +11 -0
  253. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -0
  254. package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +143 -0
  255. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts +8 -0
  256. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -0
  257. package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +102 -0
  258. package/lib/exercises/pc/forces/electroStaticForce.d.ts +13 -0
  259. package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -0
  260. package/lib/exercises/pc/forces/electroStaticForce.js +117 -0
  261. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts +9 -0
  262. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -0
  263. package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +132 -0
  264. package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts +1 -0
  265. package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts.map +1 -1
  266. package/lib/exercises/pc/forces/gravitationalAttractionValue.js +31 -27
  267. package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts +10 -0
  268. package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts.map +1 -0
  269. package/lib/exercises/pc/forces/gravitationalForcePlanets.js +118 -0
  270. package/lib/exercises/pc/forces/index.d.ts +5 -0
  271. package/lib/exercises/pc/forces/index.d.ts.map +1 -1
  272. package/lib/exercises/pc/forces/index.js +6 -0
  273. package/lib/exercises/pc/forces/massWeight.d.ts +9 -0
  274. package/lib/exercises/pc/forces/massWeight.d.ts.map +1 -0
  275. package/lib/exercises/pc/forces/massWeight.js +68 -0
  276. package/lib/exercises/pc/forces/pressureDifferenceCalculation.d.ts +1 -0
  277. package/lib/exercises/pc/forces/pressureDifferenceCalculation.d.ts.map +1 -0
  278. package/lib/exercises/pc/forces/pressureDifferenceCalculation.js +106 -0
  279. package/lib/exercises/pc/formulaFromComposition.js +2 -2
  280. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts +8 -0
  281. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts.map +1 -0
  282. package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +72 -0
  283. package/lib/exercises/pc/index.d.ts +6 -0
  284. package/lib/exercises/pc/index.d.ts.map +1 -1
  285. package/lib/exercises/pc/index.js +6 -0
  286. package/lib/exercises/pc/molarQuantity.js +2 -2
  287. package/lib/exercises/pc/mole/index.d.ts +2 -0
  288. package/lib/exercises/pc/mole/index.d.ts.map +1 -1
  289. package/lib/exercises/pc/mole/index.js +2 -0
  290. package/lib/exercises/pc/mole/molarMass.js +1 -1
  291. package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.d.ts +9 -0
  292. package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.d.ts.map +1 -0
  293. package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +75 -0
  294. package/lib/exercises/pc/mole/moleculeCountFromMol.d.ts +7 -0
  295. package/lib/exercises/pc/mole/moleculeCountFromMol.d.ts.map +1 -0
  296. package/lib/exercises/pc/mole/moleculeCountFromMol.js +66 -0
  297. package/lib/exercises/pc/moleculeFormula.js +1 -1
  298. package/lib/exercises/pc/moleculeNomenclature.js +1 -1
  299. package/lib/exercises/pc/motion/averageSpeed.d.ts +12 -0
  300. package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -0
  301. package/lib/exercises/pc/motion/averageSpeed.js +122 -0
  302. package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts +10 -0
  303. package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -0
  304. package/lib/exercises/pc/motion/averageSpeedCalculation.js +146 -0
  305. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts +7 -0
  306. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts.map +1 -0
  307. package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +86 -0
  308. package/lib/exercises/pc/motion/index.d.ts +7 -0
  309. package/lib/exercises/pc/motion/index.d.ts.map +1 -0
  310. package/lib/exercises/pc/motion/index.js +22 -0
  311. package/lib/exercises/pc/motion/motionReference.d.ts +9 -0
  312. package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -0
  313. package/lib/exercises/pc/motion/motionReference.js +168 -0
  314. package/lib/exercises/pc/motion/typeOfAcceleration.d.ts +5 -0
  315. package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -0
  316. package/lib/exercises/pc/motion/typeOfAcceleration.js +97 -0
  317. package/lib/exercises/pc/motion/typeOfMovement.d.ts +5 -0
  318. package/lib/exercises/pc/motion/typeOfMovement.d.ts.map +1 -0
  319. package/lib/exercises/pc/motion/typeOfMovement.js +111 -0
  320. package/lib/exercises/pc/orderOfMagnitude.d.ts +8 -0
  321. package/lib/exercises/pc/orderOfMagnitude.d.ts.map +1 -0
  322. package/lib/exercises/pc/orderOfMagnitude.js +68 -0
  323. package/lib/exercises/pc/pH.d.ts.map +1 -1
  324. package/lib/exercises/pc/pH.js +1 -0
  325. package/lib/exercises/pc/potentialEnergy.d.ts.map +1 -1
  326. package/lib/exercises/pc/potentialEnergy.js +17 -5
  327. package/lib/exercises/pc/power/calculatePowerOfLight.d.ts +8 -0
  328. package/lib/exercises/pc/power/calculatePowerOfLight.d.ts.map +1 -0
  329. package/lib/exercises/pc/power/calculatePowerOfLight.js +86 -0
  330. package/lib/exercises/pc/power/index.d.ts +2 -0
  331. package/lib/exercises/pc/power/index.d.ts.map +1 -0
  332. package/lib/exercises/pc/power/index.js +17 -0
  333. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts +5 -0
  334. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -0
  335. package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +117 -0
  336. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts +9 -0
  337. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts.map +1 -0
  338. package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +95 -0
  339. package/lib/exercises/pc/sound/index.d.ts +1 -0
  340. package/lib/exercises/pc/sound/index.d.ts.map +1 -1
  341. package/lib/exercises/pc/sound/index.js +1 -0
  342. package/lib/exercises/pc/spectral/spectralEnergy.d.ts.map +1 -1
  343. package/lib/exercises/pc/spectral/spectralEnergy.js +1 -0
  344. package/lib/exercises/pc/waves/index.d.ts +1 -0
  345. package/lib/exercises/pc/waves/index.d.ts.map +1 -1
  346. package/lib/exercises/pc/waves/index.js +1 -0
  347. package/lib/exercises/pc/waves/lightDistanceConversion.d.ts +10 -0
  348. package/lib/exercises/pc/waves/lightDistanceConversion.d.ts.map +1 -0
  349. package/lib/exercises/pc/waves/lightDistanceConversion.js +161 -0
  350. package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -1
  351. package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -0
  352. package/lib/exercises/pc/weight/calculateWeight.d.ts +7 -0
  353. package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -0
  354. package/lib/exercises/pc/weight/calculateWeight.js +73 -0
  355. package/lib/exercises/pc/weight/index.d.ts +1 -0
  356. package/lib/exercises/pc/weight/index.d.ts.map +1 -1
  357. package/lib/exercises/pc/weight/index.js +1 -0
  358. package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
  359. package/lib/exercises/pc/weight/weightOnTheMoon.js +7 -6
  360. package/lib/exercises/utils/getAtoms.d.ts +1 -1
  361. package/lib/exercises/utils/getAtoms.d.ts.map +1 -1
  362. package/lib/exercises/utils/getAtoms.js +1 -1
  363. package/lib/index.d.ts +216 -75
  364. package/lib/index.d.ts.map +1 -1
  365. package/lib/index.js +4 -0
  366. package/lib/math/geometry/spacePoint.d.ts +27 -0
  367. package/lib/math/geometry/spacePoint.d.ts.map +1 -0
  368. package/lib/math/geometry/spacePoint.js +80 -0
  369. package/lib/math/geometry/spaceVector.d.ts +28 -0
  370. package/lib/math/geometry/spaceVector.d.ts.map +1 -0
  371. package/lib/math/geometry/spaceVector.js +83 -0
  372. package/lib/math/numbers/decimals/decimal.d.ts +1 -0
  373. package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
  374. package/lib/math/numbers/decimals/decimal.js +8 -0
  375. package/lib/math/numbers/rationals/rational.d.ts +1 -0
  376. package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
  377. package/lib/math/numbers/rationals/rational.js +4 -0
  378. package/lib/math/numbers/reals/extendedRingElement.d.ts +1 -2
  379. package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
  380. package/lib/math/polynomials/affine.d.ts +4 -0
  381. package/lib/math/polynomials/affine.d.ts.map +1 -1
  382. package/lib/math/polynomials/affine.js +10 -0
  383. package/lib/math/polynomials/trinom.d.ts +2 -1
  384. package/lib/math/polynomials/trinom.d.ts.map +1 -1
  385. package/lib/math/polynomials/trinom.js +3 -0
  386. package/lib/pc/constants/atoms.d.ts +0 -1
  387. package/lib/pc/constants/atoms.d.ts.map +1 -1
  388. package/lib/pc/constants/atoms.js +2 -2
  389. package/lib/pc/constants/coulomb.d.ts +3 -0
  390. package/lib/pc/constants/coulomb.d.ts.map +1 -0
  391. package/lib/pc/constants/coulomb.js +13 -0
  392. package/lib/pc/constants/earth.d.ts +0 -1
  393. package/lib/pc/constants/earth.d.ts.map +1 -1
  394. package/lib/pc/constants/earth.js +4 -4
  395. package/lib/pc/constants/gravity.d.ts +1 -1
  396. package/lib/pc/constants/gravity.d.ts.map +1 -1
  397. package/lib/pc/constants/gravity.js +16 -7
  398. package/lib/pc/constants/mechanics/gravitational.d.ts +14 -0
  399. package/lib/pc/constants/mechanics/gravitational.d.ts.map +1 -0
  400. package/lib/pc/constants/mechanics/gravitational.js +37 -0
  401. package/lib/pc/constants/mechanics/planets.d.ts +15 -0
  402. package/lib/pc/constants/mechanics/planets.d.ts.map +1 -0
  403. package/lib/pc/constants/mechanics/planets.js +35 -0
  404. package/lib/pc/constants/mechanics/waves.d.ts +8 -0
  405. package/lib/pc/constants/mechanics/waves.d.ts.map +1 -0
  406. package/lib/pc/constants/mechanics/waves.js +8 -0
  407. package/lib/pc/constants/molecularChemistry/atomSymbols.d.ts +2 -0
  408. package/lib/pc/constants/molecularChemistry/atomSymbols.d.ts.map +1 -0
  409. package/lib/pc/constants/molecularChemistry/atomSymbols.js +2 -0
  410. package/lib/pc/constants/molecularChemistry/atome.d.ts +18 -0
  411. package/lib/pc/constants/molecularChemistry/atome.d.ts.map +1 -0
  412. package/lib/pc/constants/molecularChemistry/atome.js +174 -0
  413. package/lib/pc/constants/molecularChemistry/atoms.d.ts +9 -0
  414. package/lib/pc/constants/molecularChemistry/atoms.d.ts.map +1 -0
  415. package/lib/pc/constants/molecularChemistry/atoms.js +15 -0
  416. package/lib/pc/constants/molecularChemistry/molecule.d.ts +25 -0
  417. package/lib/pc/constants/molecularChemistry/molecule.d.ts.map +1 -0
  418. package/lib/pc/constants/molecularChemistry/molecule.js +579 -0
  419. package/lib/pc/constants/molecularChemistry/reaction.d.ts +27 -0
  420. package/lib/pc/constants/molecularChemistry/reaction.d.ts.map +1 -0
  421. package/lib/pc/constants/molecularChemistry/reaction.js +471 -0
  422. package/lib/pc/measure/measure.d.ts +16 -6
  423. package/lib/pc/measure/measure.d.ts.map +1 -1
  424. package/lib/pc/measure/measure.js +112 -16
  425. package/lib/pc/units/AmountOfSubstance.d.ts +17 -0
  426. package/lib/pc/units/AmountOfSubstance.d.ts.map +1 -0
  427. package/lib/pc/units/AmountOfSubstance.js +40 -0
  428. package/lib/pc/units/PressionUnit.d.ts +17 -0
  429. package/lib/pc/units/PressionUnit.d.ts.map +1 -0
  430. package/lib/pc/units/PressionUnit.js +32 -0
  431. package/lib/pc/units/distanceUnits.d.ts +16 -0
  432. package/lib/pc/units/distanceUnits.d.ts.map +1 -0
  433. package/lib/pc/units/distanceUnits.js +32 -0
  434. package/lib/pc/units/divideUnit.d.ts +13 -0
  435. package/lib/pc/units/divideUnit.d.ts.map +1 -0
  436. package/lib/pc/units/divideUnit.js +32 -0
  437. package/lib/pc/units/electricalChargeUnit.d.ts +17 -0
  438. package/lib/pc/units/electricalChargeUnit.d.ts.map +1 -0
  439. package/lib/pc/units/electricalChargeUnit.js +40 -0
  440. package/lib/pc/units/electricalResistanceUnit.d.ts +18 -0
  441. package/lib/pc/units/electricalResistanceUnit.d.ts.map +1 -0
  442. package/lib/pc/units/electricalResistanceUnit.js +32 -0
  443. package/lib/pc/units/electricalUnit.d.ts +18 -0
  444. package/lib/pc/units/electricalUnit.d.ts.map +1 -0
  445. package/lib/pc/units/electricalUnit.js +32 -0
  446. package/lib/pc/units/energyUnit.d.ts +16 -0
  447. package/lib/pc/units/energyUnit.d.ts.map +1 -0
  448. package/lib/pc/units/energyUnit.js +32 -0
  449. package/lib/pc/units/forceUnits.d.ts +16 -0
  450. package/lib/pc/units/forceUnits.d.ts.map +1 -0
  451. package/lib/pc/units/forceUnits.js +32 -0
  452. package/lib/pc/units/frequenceUnit.d.ts +17 -0
  453. package/lib/pc/units/frequenceUnit.d.ts.map +1 -0
  454. package/lib/pc/units/frequenceUnit.js +40 -0
  455. package/lib/pc/units/interfaces/baseTenUnit.d.ts +10 -0
  456. package/lib/pc/units/interfaces/baseTenUnit.d.ts.map +1 -0
  457. package/lib/pc/units/interfaces/baseTenUnit.js +16 -0
  458. package/lib/pc/units/interfaces/basicUnit.d.ts +13 -0
  459. package/lib/pc/units/interfaces/basicUnit.d.ts.map +1 -0
  460. package/lib/pc/units/interfaces/basicUnit.js +19 -0
  461. package/lib/pc/units/interfaces/unit.d.ts +13 -0
  462. package/lib/pc/units/interfaces/unit.d.ts.map +1 -0
  463. package/lib/pc/units/interfaces/unit.js +2 -0
  464. package/lib/pc/units/massUnits.d.ts +17 -0
  465. package/lib/pc/units/massUnits.d.ts.map +1 -0
  466. package/lib/pc/units/massUnits.js +32 -0
  467. package/lib/pc/units/mulitplyUnits.d.ts +13 -0
  468. package/lib/pc/units/mulitplyUnits.d.ts.map +1 -0
  469. package/lib/pc/units/mulitplyUnits.js +26 -0
  470. package/lib/pc/units/powerUnits.d.ts +14 -0
  471. package/lib/pc/units/powerUnits.d.ts.map +1 -0
  472. package/lib/pc/units/powerUnits.js +26 -0
  473. package/lib/pc/units/timeUnits.d.ts +13 -0
  474. package/lib/pc/units/timeUnits.d.ts.map +1 -0
  475. package/lib/pc/units/timeUnits.js +42 -0
  476. package/lib/pc/units/volumeUnit.d.ts +17 -0
  477. package/lib/pc/units/volumeUnit.d.ts.map +1 -0
  478. package/lib/pc/units/volumeUnit.js +32 -0
  479. package/lib/pc/units/wattUnit.d.ts +17 -0
  480. package/lib/pc/units/wattUnit.d.ts.map +1 -0
  481. package/lib/pc/units/wattUnit.js +32 -0
  482. package/lib/playground.d.ts +2 -0
  483. package/lib/playground.d.ts.map +1 -0
  484. package/lib/playground.js +19 -0
  485. package/lib/server.d.ts +3 -0
  486. package/lib/server.d.ts.map +1 -1
  487. package/lib/server.js +11 -5
  488. package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
  489. package/lib/tree/nodes/equations/equationSolutionNode.js +8 -0
  490. package/lib/tree/nodes/node.d.ts +4 -0
  491. package/lib/tree/nodes/node.d.ts.map +1 -1
  492. package/lib/tree/nodes/operators/addNode.js +2 -2
  493. package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
  494. package/lib/tree/nodes/operators/multiplyNode.js +40 -12
  495. package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
  496. package/lib/tree/nodes/operators/powerNode.js +12 -0
  497. package/lib/utils/alignTex.d.ts +2 -0
  498. package/lib/utils/alignTex.d.ts.map +1 -0
  499. package/lib/utils/alignTex.js +18 -0
  500. package/package.json +1 -1
@@ -6,6 +6,9 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
6
6
  const affine_1 = require("../../../../math/polynomials/affine");
7
7
  const randint_1 = require("../../../../math/utils/random/randint");
8
8
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
9
+ const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
10
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
11
+ const alignTex_1 = require("../../../../utils/alignTex");
9
12
  const getFactoType1Question = () => {
10
13
  const affine = affine_1.AffineConstructor.random({
11
14
  min: 1,
@@ -13,6 +16,9 @@ const getFactoType1Question = () => {
13
16
  }, { excludes: [0] });
14
17
  const affine2 = new affine_1.Affine(affine.a, -affine.b);
15
18
  const statementTree = affine.multiply(affine2).toTree();
19
+ const statementTex = statementTree.toTex();
20
+ const bPositive = Math.abs(affine.b);
21
+ const aMonom = new multiplyNode_1.MultiplyNode(affine.a.toTree(), "x".toTree());
16
22
  const answerTree = new multiplyNode_1.MultiplyNode(affine.toTree(), affine2.toTree());
17
23
  const answer = answerTree.toTex();
18
24
  const question = {
@@ -25,6 +31,18 @@ const getFactoType1Question = () => {
25
31
  affine1Coeffs: affine.coefficients,
26
32
  affine2Coeffs: affine2.coefficients,
27
33
  },
34
+ hint: `Utilise l'identité remarquable $a^2 - b^2 = (a-b)(a+b)$`,
35
+ correction: `
36
+ On utilise l'identité remarquable $ a^2 - b^2=(a-b)(a+b)$ en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$ :
37
+
38
+ ${(0, alignTex_1.alignTex)([
39
+ [
40
+ statementTex,
41
+ "=",
42
+ new substractNode_1.SubstractNode(new powerNode_1.SquareNode(aMonom), new powerNode_1.SquareNode(bPositive.toTree())).toTex(),
43
+ ],
44
+ ["", "=", answer],
45
+ ])}`,
28
46
  };
29
47
  return question;
30
48
  };
@@ -63,4 +81,5 @@ exports.factoIdRmq3 = {
63
81
  getPropositions,
64
82
  isAnswerValid,
65
83
  subject: "Mathématiques",
84
+ hasHintAndCorrection: true,
66
85
  };
@@ -1 +1 @@
1
- {"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAyHF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
1
+ {"version":3,"file":"factoType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoType1Exercise.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA0HF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
@@ -12,6 +12,7 @@ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
12
12
  const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
13
13
  const random_1 = require("../../../../utils/random");
14
14
  const shuffle_1 = require("../../../../utils/shuffle");
15
+ //TODO fix { "affinesCoeffs": [ [ -2, 8 ], [ -5, 4 ], [ 0, -8 ] ], "operation": "substract" } donne trop de moins
15
16
  const getFactoType1Question = () => {
16
17
  const affines = affine_1.AffineConstructor.differentRandoms(3);
17
18
  const permut = [
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ };
6
+ export declare const factorizeCanonicalForm: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=factorizeCanonicalForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factorizeCanonicalForm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuFF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.factorizeCanonicalForm = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const affine_1 = require("../../../../math/polynomials/affine");
7
+ const randint_1 = require("../../../../math/utils/random/randint");
8
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
9
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
10
+ const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
11
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
12
+ const alignTex_1 = require("../../../../utils/alignTex");
13
+ //(x-a)^2-b^2 avec b entier
14
+ const getFactorizeCanonicalFormQuestion = () => {
15
+ const affine = new affine_1.Affine(1, (0, randint_1.randint)(-10, 10, [0]));
16
+ const b = (0, randint_1.randint)(-10, 10, [0]);
17
+ const statement = new substractNode_1.SubstractNode(new powerNode_1.SquareNode(affine.toTree()), (b ** 2).toTree());
18
+ const bPositive = Math.abs(b);
19
+ const answer = new multiplyNode_1.MultiplyNode(affine.add(-bPositive).toTree(), affine.add(bPositive).toTree()).toTex();
20
+ const statementTex = statement.toTex();
21
+ const question = {
22
+ answer,
23
+ instruction: `Factoriser : $${statementTex}$`,
24
+ keys: ["x"],
25
+ answerFormat: "tex",
26
+ identifiers: { a: affine.b, b },
27
+ hint: `Utilise l'identité remarquable $a^2 - b^2 = (a-b)(a+b)$`,
28
+ correction: `
29
+ On utilise l'identité remarquable $ a^2 - b^2=(a-b)(a+b)$ en prenant $a=${affine.toTex()}$ et $b=${bPositive}$ :
30
+
31
+ ${(0, alignTex_1.alignTex)([
32
+ [
33
+ statementTex,
34
+ "=",
35
+ new substractNode_1.SubstractNode(new powerNode_1.SquareNode(affine.toTree()), new powerNode_1.SquareNode(bPositive.toTree())).toTex(),
36
+ ],
37
+ [
38
+ "",
39
+ "=",
40
+ new multiplyNode_1.MultiplyNode(new addNode_1.AddNode(affine.toTree(), (-bPositive).toTree()), new addNode_1.AddNode(affine.toTree(), bPositive.toTree())).toTex(),
41
+ ],
42
+ ["", "=", answer],
43
+ ])}`,
44
+ };
45
+ return question;
46
+ };
47
+ const getPropositions = (n, { answer, a, b }) => {
48
+ const propositions = [];
49
+ (0, exercise_1.addValidProp)(propositions, answer);
50
+ const affine = new affine_1.Affine(a, b);
51
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(affine.add(-(b ** 2)).toTree(), affine.add(b ** 2).toTree()).toTex());
52
+ while (propositions.length < n) {
53
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new affine_1.Affine(1, (0, randint_1.randint)(-10, 10)).toTree(), new affine_1.Affine(1, (0, randint_1.randint)(-10, 10)).toTree()).toTex());
54
+ }
55
+ return (0, exercise_1.shuffleProps)(propositions, n);
56
+ };
57
+ const isAnswerValid = (ans, { answer, a, b }) => {
58
+ const affine = new affine_1.Affine(1, a);
59
+ const bPositive = Math.abs(b);
60
+ const answerTree = new multiplyNode_1.MultiplyNode(affine.add(-bPositive).toTree(), affine.add(bPositive).toTree());
61
+ return answerTree.toAllValidTexs().includes(ans);
62
+ };
63
+ exports.factorizeCanonicalForm = {
64
+ id: "factorizeCanonicalForm",
65
+ connector: "=",
66
+ label: "Factoriser une expression du type $(x-a)^2-b^2$ avec $b$ entier",
67
+ levels: [],
68
+ isSingleStep: true,
69
+ sections: [],
70
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactorizeCanonicalFormQuestion, nb),
71
+ qcmTimer: 60,
72
+ freeTimer: 60,
73
+ getPropositions,
74
+ isAnswerValid,
75
+ subject: "Mathématiques",
76
+ hasHintAndCorrection: true,
77
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ a: number;
4
+ bOperand: number;
5
+ };
6
+ export declare const factorizeCanonicalFormWithSqrt: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=factorizeCanonicalFormWithSqrt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factorizeCanonicalFormWithSqrt.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA2FF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAehE,CAAC"}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.factorizeCanonicalFormWithSqrt = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const real_1 = require("../../../../math/numbers/reals/real");
7
+ const affine_1 = require("../../../../math/polynomials/affine");
8
+ const randint_1 = require("../../../../math/utils/random/randint");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
11
+ const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
12
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
13
+ const alignTex_1 = require("../../../../utils/alignTex");
14
+ //(x-a)^2-b^2 avec b irrational
15
+ const getFactorizeCanonicalFormWithSqrtQuestion = () => {
16
+ const affine = new affine_1.Affine(1, (0, randint_1.randint)(-10, 10, [0]));
17
+ const b = real_1.SquareRootConstructor.randomIrreductible(10);
18
+ const statement = new substractNode_1.SubstractNode(new powerNode_1.SquareNode(affine.toTree()), b.operand.toTree());
19
+ const answer = new multiplyNode_1.MultiplyNode(new substractNode_1.SubstractNode(affine.toTree(), b.toTree()), new addNode_1.AddNode(affine.toTree(), b.toTree()))
20
+ .simplify({ forbidFactorize: true })
21
+ .toTex();
22
+ const statementTex = statement.toTex();
23
+ const question = {
24
+ answer,
25
+ instruction: `Factoriser : $${statementTex}$`,
26
+ keys: ["x"],
27
+ answerFormat: "tex",
28
+ identifiers: { a: affine.b, bOperand: b.operand },
29
+ hint: `Utilise l'identité remarquable $a^2 - b^2 = (a-b)(a+b)$`,
30
+ correction: `
31
+ On utilise l'identité remarquable $ a^2 - b^2=(a-b)(a+b)$ en prenant $a=${affine.toTex()}$ et $b=${b
32
+ .toTree()
33
+ .toTex()}$ :
34
+
35
+
36
+ ${(0, alignTex_1.alignTex)([
37
+ [
38
+ statementTex,
39
+ "=",
40
+ new substractNode_1.SubstractNode(new powerNode_1.SquareNode(affine.toTree()), new powerNode_1.SquareNode(b.toTree())).toTex(),
41
+ ],
42
+ ["", "=", answer],
43
+ ])}
44
+
45
+ `,
46
+ };
47
+ return question;
48
+ };
49
+ const getPropositions = (n, { answer, a, bOperand }) => {
50
+ const propositions = [];
51
+ const affine = new affine_1.Affine(1, a);
52
+ (0, exercise_1.addValidProp)(propositions, answer);
53
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(affine.add(bOperand).toTree(), affine.add(-bOperand).toTree()).toTex());
54
+ while (propositions.length < n) {
55
+ const randomSqrt = real_1.SquareRootConstructor.randomIrreductible(10);
56
+ (0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(new substractNode_1.SubstractNode(affine.toTree(), randomSqrt.toTree()), new addNode_1.AddNode(affine.toTree(), randomSqrt.toTree())).toTex());
57
+ }
58
+ return (0, exercise_1.shuffleProps)(propositions, n);
59
+ };
60
+ const isAnswerValid = (ans, { answer, a, bOperand }) => {
61
+ const affine = new affine_1.Affine(1, a);
62
+ const b = new real_1.SquareRoot(bOperand);
63
+ const answerTree = new multiplyNode_1.MultiplyNode(new substractNode_1.SubstractNode(affine.toTree(), b.toTree()), new addNode_1.AddNode(affine.toTree(), b.toTree())).simplify({ forbidFactorize: true });
64
+ return answerTree.toAllValidTexs().includes(ans);
65
+ };
66
+ exports.factorizeCanonicalFormWithSqrt = {
67
+ id: "factorizeCanonicalFormWithSqrt",
68
+ connector: "=",
69
+ label: "Factoriser une expression du type $(x-a)^2-b^2$ avec $b$ irrationnel",
70
+ levels: [],
71
+ isSingleStep: true,
72
+ sections: [],
73
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFactorizeCanonicalFormWithSqrtQuestion, nb),
74
+ qcmTimer: 60,
75
+ freeTimer: 60,
76
+ getPropositions,
77
+ isAnswerValid,
78
+ subject: "Mathématiques",
79
+ hasHintAndCorrection: true,
80
+ };
@@ -2,4 +2,6 @@ export * from "./factoIdRmq1";
2
2
  export * from "./factoIdRmq2";
3
3
  export * from "./factoIdRmq3";
4
4
  export * from "./factoType1Exercise";
5
+ export * from "./factorizeCanonicalForm";
6
+ export * from "./factorizeCanonicalFormWithSqrt";
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC"}
@@ -18,3 +18,5 @@ __exportStar(require("./factoIdRmq1"), exports);
18
18
  __exportStar(require("./factoIdRmq2"), exports);
19
19
  __exportStar(require("./factoIdRmq3"), exports);
20
20
  __exportStar(require("./factoType1Exercise"), exports);
21
+ __exportStar(require("./factorizeCanonicalForm"), exports);
22
+ __exportStar(require("./factorizeCanonicalFormWithSqrt"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"lengthConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/lengthConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAIxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAyDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
1
+ {"version":3,"file":"lengthConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/lengthConversion.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAIxB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA+DF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
@@ -3,20 +3,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.lengthConversion = void 0;
4
4
  const decimal_1 = require("../../../math/numbers/decimals/decimal");
5
5
  const randint_1 = require("../../../math/utils/random/randint");
6
+ const measure_1 = require("../../../pc/measure/measure");
7
+ const distanceUnits_1 = require("../../../pc/units/distanceUnits");
6
8
  const shuffle_1 = require("../../../utils/shuffle");
7
9
  const exercise_1 = require("../../exercise");
8
10
  const getDistinctQuestions_1 = require("../../utils/getDistinctQuestions");
9
11
  const units = ["mm", "cm", "dm", "m", "dam", "hm", "km"];
12
+ const unitsObj = [
13
+ distanceUnits_1.DistanceUnit.mm,
14
+ distanceUnits_1.DistanceUnit.cm,
15
+ distanceUnits_1.DistanceUnit.dm,
16
+ distanceUnits_1.DistanceUnit.m,
17
+ distanceUnits_1.DistanceUnit.dam,
18
+ distanceUnits_1.DistanceUnit.hm,
19
+ distanceUnits_1.DistanceUnit.km,
20
+ ];
10
21
  const getLengthConversion = () => {
11
22
  const randomUnitIndex = (0, randint_1.randint)(0, 7);
12
23
  const randomUnitInstructionIndex = (0, randint_1.randint)(0, 7, [randomUnitIndex]);
13
24
  const randomLength = decimal_1.DecimalConstructor.random(0, 1000, (0, randint_1.randint)(0, 4));
25
+ const measure = new measure_1.Measure(randomLength.value, 0, unitsObj[randomUnitIndex]);
14
26
  console.log("length conv q");
15
- const answer = (randomLength.multiplyByPowerOfTen(randomUnitIndex - randomUnitInstructionIndex).value + "").replace(".", ",");
27
+ const answer = measure
28
+ .convert(units[randomUnitInstructionIndex])
29
+ .toTex({ notScientific: true });
16
30
  const question = {
17
- instruction: `Compléter : $${randomLength.value
18
- .toString()
19
- .replace(".", ",")} \\textrm{${units[randomUnitIndex]}} = \\ldots \\textrm{${units[randomUnitInstructionIndex]}}$`,
31
+ instruction: `Compléter : $${measure.toTex({
32
+ notScientific: true,
33
+ })} = \\ldots ${unitsObj[randomUnitInstructionIndex].toTex()}$`,
20
34
  answer,
21
35
  keys: [],
22
36
  answerFormat: "tex",
@@ -1 +1 @@
1
- {"version":3,"file":"equaDiffGeneralForme.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffGeneralForme.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6EF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
1
+ {"version":3,"file":"equaDiffGeneralForme.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/equaDiff/equaDiffGeneralForme.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6EF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
@@ -63,4 +63,5 @@ exports.exponentialDifferentialEquation = {
63
63
  getPropositions,
64
64
  isAnswerValid,
65
65
  subject: "Mathématiques",
66
+ hasHintAndCorrection: true,
66
67
  };
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ xA: number;
4
+ xB: number;
5
+ yA: number;
6
+ yB: number;
7
+ };
8
+ export declare const affineExpressionFromTwoImages: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=affineExpressionFromTwoImages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"affineExpressionFromTwoImages.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/affineExpressionFromTwoImages.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AA8EF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAe/D,CAAC"}
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.affineExpressionFromTwoImages = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const rational_1 = require("../../../../math/numbers/rationals/rational");
7
+ const affine_1 = require("../../../../math/polynomials/affine");
8
+ const randint_1 = require("../../../../math/utils/random/randint");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
11
+ const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
12
+ const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
13
+ const shuffle_1 = require("../../../../utils/shuffle");
14
+ const getAffineExpressionFromTwoImagesQuestion = () => {
15
+ const [xA, yA] = [1, 2].map((el) => (0, randint_1.randint)(-9, 10));
16
+ const xB = (0, randint_1.randint)(-9, 10, [xA]);
17
+ const yB = (0, randint_1.randint)(-9, 10);
18
+ const a = new rational_1.Rational(yB - yA, xB - xA).simplify().toTree();
19
+ //yA = axA+b donc b = yA-axA
20
+ const b = new substractNode_1.SubstractNode(yA.toTree(), new multiplyNode_1.MultiplyNode(a, xA.toTree())).simplify();
21
+ const answer = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a, new variableNode_1.VariableNode("x")), b)
22
+ .simplify({ forceDistributeFractions: true })
23
+ .toTex();
24
+ console.log(a.toTex(), b.toTex());
25
+ const question = {
26
+ instruction: `Soit $f$ une fonction affine telle que $f(${xA}) = ${yA}$ et $f(${xB}) = ${yB}$.
27
+
28
+ Quelle est l'expression algébrique de $f$ ?`,
29
+ startStatement: "a",
30
+ answer,
31
+ hint: "Calcule d'abord le taux d'accroissement de $f$ en utilisant la formule $a = \\frac{y_2-y_1}{x_2-x_1}$. Ensuite, utilise les coordonnées d'un des deux points pour déterminer l'ordonnée à l'origine.",
32
+ correction: `On calcule d'abord le taux d'accroissement $a$ :
33
+
34
+ $a = \\frac{y_2-y_1}{x_2-x_1} = \\frac{${yB}-${yA}}{${xB}-${xA}} = ${a.toTex()}$
35
+
36
+ Il faut ensuite trouver l'ordonnée à l'origine $b$. On sait que $f(${xA}) = ${yA}$. Or pour tout $x$ réel, on a $f(x) = ax+b$.
37
+
38
+ Donc $${yA} = ${new multiplyNode_1.MultiplyNode(a, xA.toTree()).toTex()}+b$. On a donc $b = ${new substractNode_1.SubstractNode(yA.toTree(), new multiplyNode_1.MultiplyNode(a, xA.toTree())).toTex()} = ${b.toTex()}$.
39
+
40
+ Ainsi, $f(x) = ${answer}$.
41
+ `,
42
+ answerFormat: "tex",
43
+ keys: ["x"],
44
+ identifiers: { xA, xB, yA, yB },
45
+ };
46
+ return question;
47
+ };
48
+ const getPropositions = (n, { answer, xA, xB, yA, yB }) => {
49
+ const propositions = [];
50
+ (0, exercise_1.addValidProp)(propositions, answer);
51
+ while (propositions.length < n) {
52
+ const wrongAnswer = affine_1.AffineConstructor.random().toTex();
53
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
54
+ }
55
+ return (0, shuffle_1.shuffle)(propositions);
56
+ };
57
+ const isAnswerValid = (ans, { xA, xB, yA, yB }) => {
58
+ const a = new rational_1.Rational(yB - yA, xB - xA).simplify().toTree();
59
+ //yA = axA+b donc b = yA-axA
60
+ const b = new substractNode_1.SubstractNode(yA.toTree(), new multiplyNode_1.MultiplyNode(a, xA.toTree())).simplify();
61
+ const answer = new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a, new variableNode_1.VariableNode("x")), b, {
62
+ allowFractionToDecimal: true,
63
+ }).simplify({ forceDistributeFractions: true });
64
+ const texs = answer.toAllValidTexs();
65
+ return texs.includes(ans);
66
+ };
67
+ exports.affineExpressionFromTwoImages = {
68
+ id: "affineExpressionFromTwoImages",
69
+ connector: "=",
70
+ label: "Expression algébrique d'une fonction affine via deux images",
71
+ levels: ["3ème", "2nde", "2ndPro", "1rePro", "1reTech"],
72
+ isSingleStep: true,
73
+ sections: ["Fonctions affines", "Droites"],
74
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAffineExpressionFromTwoImagesQuestion, nb),
75
+ qcmTimer: 60,
76
+ freeTimer: 60,
77
+ getPropositions,
78
+ isAnswerValid,
79
+ subject: "Mathématiques",
80
+ hasHintAndCorrection: true,
81
+ };
@@ -10,4 +10,5 @@ export * from "./affineAdjustment";
10
10
  export * from "./affineAdjustmentRsquared";
11
11
  export * from "./affineAdjustmentComplete";
12
12
  export * from "./affineMeanValue";
13
+ export * from "./affineExpressionFromTwoImages";
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/affines/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iCAAiC,CAAC"}
@@ -26,3 +26,4 @@ __exportStar(require("./affineAdjustment"), exports);
26
26
  __exportStar(require("./affineAdjustmentRsquared"), exports);
27
27
  __exportStar(require("./affineAdjustmentComplete"), exports);
28
28
  __exportStar(require("./affineMeanValue"), exports);
29
+ __exportStar(require("./affineExpressionFromTwoImages"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA+CF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
1
+ {"version":3,"file":"log10PowerSimplifying.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/logarithm/log10PowerSimplifying.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAuDF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
@@ -7,6 +7,7 @@ const decimal_1 = require("../../../../math/numbers/decimals/decimal");
7
7
  const randint_1 = require("../../../../math/utils/random/randint");
8
8
  const log10Node_1 = require("../../../../tree/nodes/functions/log10Node");
9
9
  const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
10
+ const alignTex_1 = require("../../../../utils/alignTex");
10
11
  const getLog10PowerSimplifyingQuestion = () => {
11
12
  const tenthPower = (0, randint_1.randint)(-6, 8, [1]);
12
13
  console.log("log10 power simp q");
@@ -38,8 +39,16 @@ const getHint = (nb) => {
38
39
  };
39
40
  const getCorrection = (tenthPower, nb) => {
40
41
  const powerTen = new powerNode_1.PowerNode((10).toTree(), tenthPower.toTree());
41
- return `1 . On exprime $${nb.toTex()}$ en puissance de $10$ : $${nb.toTex()} = ${powerTen.toTex()}$ \n
42
- 2 . On utilise la propriété $\\log(a^{b}) = b\\times \\log(a)$. On a alors $\\log(${nb.toTex()}) = \\log(${powerTen.toTex()}) = ${tenthPower}\\times \\log(10) = ${tenthPower}$.
42
+ return `On exprime $${nb.toTex()}$ en puissance de $10$ :
43
+ ${(0, alignTex_1.alignTex)(`${nb.toTex()} = ${powerTen.toTex()}`)}
44
+ On utilise la propriété $\\log(a^{b}) = b\\times \\log(a)$.
45
+
46
+ On a alors
47
+ ${(0, alignTex_1.alignTex)([
48
+ [`\\log(${nb.toTex()})`, `= \\log(${powerTen.toTex()})`],
49
+ ["", `= ${tenthPower}\\times \\log(10)`],
50
+ ["", `= ${tenthPower}`],
51
+ ])}
43
52
  `;
44
53
  };
45
54
  const isAnswerValid = (ans, { answer, tenthPower }) => {
@@ -59,4 +68,5 @@ exports.log10PowerSimplifying = {
59
68
  isAnswerValid,
60
69
  maxAllowedQuestions: 10,
61
70
  subject: "Mathématiques",
71
+ hasHintAndCorrection: true,
62
72
  };
@@ -15,4 +15,6 @@ export * from "./summitReading";
15
15
  export * from "./summitAbscissFromRoots";
16
16
  export * from "./summitAbscissFromDevForm";
17
17
  export * from "./trinomialMeanValue";
18
+ export * from "./solveSecondDegreeEquationByFactorisation";
19
+ export * from "./solveSecondDegreeEquationFromCano";
18
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC"}
@@ -31,3 +31,5 @@ __exportStar(require("./summitReading"), exports);
31
31
  __exportStar(require("./summitAbscissFromRoots"), exports);
32
32
  __exportStar(require("./summitAbscissFromDevForm"), exports);
33
33
  __exportStar(require("./trinomialMeanValue"), exports);
34
+ __exportStar(require("./solveSecondDegreeEquationByFactorisation"), exports);
35
+ __exportStar(require("./solveSecondDegreeEquationFromCano"), exports);
@@ -0,0 +1,5 @@
1
+ import { Exercise } from '../../../../exercises/exercise';
2
+ type Identifiers = {};
3
+ export declare const solveEquationByFactorisation: Exercise<Identifiers>;
4
+ export {};
5
+ //# sourceMappingURL=solveEquationByFactorisation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solveEquationByFactorisation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/solveEquationByFactorisation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAGlC,KAAK,WAAW,GAAG,EAClB,CAAC;AA+BF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAc9D,CAAC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.solveEquationByFactorisation = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const getSolveEquationByFactorisationQuestion = () => {
7
+ const question = {
8
+ answer,
9
+ instruction: ``,
10
+ keys: [],
11
+ answerFormat: 'tex',
12
+ identifiers: {}
13
+ };
14
+ return question;
15
+ };
16
+ const getPropositions = (n, { answer }) => {
17
+ const propositions = [];
18
+ (0, exercise_1.addValidProp)(propositions, answer);
19
+ while (propositions.length < n) {
20
+ throw Error("QCM not implemented");
21
+ }
22
+ return (0, exercise_1.shuffleProps)(propositions, n);
23
+ };
24
+ const isAnswerValid = (ans, { answer }) => {
25
+ throw Error("VEA not implemented");
26
+ };
27
+ const isGGBAnswerValid = (ans, { ggbAnswer }) => {
28
+ throw Error("GGBVea not implemented");
29
+ };
30
+ exports.solveEquationByFactorisation = {
31
+ id: 'solveEquationByFactorisation',
32
+ connector: "",
33
+ label: "",
34
+ levels: [],
35
+ isSingleStep: true,
36
+ sections: [],
37
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSolveEquationByFactorisationQuestion, nb),
38
+ qcmTimer: 60,
39
+ freeTimer: 60,
40
+ getPropositions,
41
+ isAnswerValid,
42
+ isGGBAnswerValid,
43
+ subject: "Mathématiques"
44
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ a: number;
4
+ b: number;
5
+ type: number;
6
+ };
7
+ export declare const solveSecondDegreeEquationByFactorisation: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=solveSecondDegreeEquationByFactorisation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"solveSecondDegreeEquationByFactorisation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAgIF,eAAO,MAAM,wCAAwC,EAAE,QAAQ,CAAC,WAAW,CAiB1E,CAAC"}