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
@@ -11,6 +11,8 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
11
11
  const shuffle_1 = require("../../../../utils/shuffle");
12
12
  const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
13
13
  const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
14
+ const alignTex_1 = require("../../../../utils/alignTex");
15
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
14
16
  const getEquationType1ExerciseQuestion = () => {
15
17
  const b = (0, randint_1.randint)(-10, 11);
16
18
  const a = (0, randint_1.randint)(-10, 11, [0]);
@@ -18,13 +20,26 @@ const getEquationType1ExerciseQuestion = () => {
18
20
  const affine = new affine_1.Affine(1, a).toTree();
19
21
  const tree = new equalNode_1.EqualNode(affine, new numberNode_1.NumberNode(b));
20
22
  const answer = `x=${solution}`;
23
+ const statementTree = tree.toTex();
21
24
  const question = {
22
- instruction: `Résoudre : $${tree.toTex()}$`,
23
- startStatement: tree.toTex(),
25
+ instruction: `Résoudre : $${statementTree}$`,
26
+ startStatement: statementTree,
24
27
  answer,
25
28
  keys: equationKeys_1.equationKeys,
26
29
  answerFormat: "tex",
27
30
  identifiers: { a, b },
31
+ hint: `Il faut isoler $x$ à gauche. Pour cela, effectue l'opération des deux côtés de l'équation qui permet de supprimer le terme $${a < 0 ? "" : "+"}${a}$.`,
32
+ correction: `Pour isoler $x$ à gauche, on effectue l'opération $${a > 0 ? `$-${a}$` : `+${Math.abs(a)}`}$ des deux côtés de l'équation :
33
+
34
+ ${(0, alignTex_1.alignTex)([
35
+ [
36
+ `${statementTree}`,
37
+ "\\iff",
38
+ new equalNode_1.EqualNode(new addNode_1.AddNode(affine, new numberNode_1.NumberNode(-a)), new addNode_1.AddNode(b.toTree(), new numberNode_1.NumberNode(-a))).toTex(),
39
+ ],
40
+ ["", "\\iff", answer],
41
+ ])}
42
+ `,
28
43
  };
29
44
  return question;
30
45
  };
@@ -58,4 +73,5 @@ exports.equationType1Exercise = {
58
73
  freeTimer: 60,
59
74
  isAnswerValid,
60
75
  subject: "Mathématiques",
76
+ hasHintAndCorrection: true,
61
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAgBlC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqDF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
1
+ {"version":3,"file":"equationType2Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType2Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAmBlC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
@@ -12,6 +12,9 @@ const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
12
12
  const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
13
13
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
14
14
  const shuffle_1 = require("../../../../utils/shuffle");
15
+ const alignTex_1 = require("../../../../utils/alignTex");
16
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
17
+ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
15
18
  const getEquationType2ExerciseQuestion = () => {
16
19
  const b = (0, randint_1.randint)(-10, 11);
17
20
  const a = (0, randint_1.randint)(-9, 10, [0, 1]);
@@ -19,13 +22,26 @@ const getEquationType2ExerciseQuestion = () => {
19
22
  const affine = new affine_1.Affine(a, 0).toTree();
20
23
  const tree = new equalNode_1.EqualNode(affine, b.toTree());
21
24
  const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("x"), solution.toTree()).toTex();
25
+ const statementTex = tree.toTex();
22
26
  const question = {
23
- instruction: `Résoudre : $${tree.toTex()}$`,
24
- startStatement: tree.toTex(),
27
+ instruction: `Résoudre : $${statementTex}$`,
28
+ startStatement: statementTex,
25
29
  answer,
26
30
  keys: equationKeys_1.equationKeys,
27
31
  answerFormat: "tex",
28
32
  identifiers: { a, b: b },
33
+ hint: `Il faut isoler $x$ à gauche. Pour cela, effectue l'opération des deux côtés de l'équation qui permet de supprimer la multiplication par $${a}$.`,
34
+ correction: `Pour isoler $x$ à gauche, on divise les deux côtés de l'équation par $${a}$:
35
+
36
+ ${(0, alignTex_1.alignTex)([
37
+ [
38
+ `${statementTex}`,
39
+ "\\iff",
40
+ new equalNode_1.EqualNode(new fractionNode_1.FractionNode(affine, new numberNode_1.NumberNode(a)), new fractionNode_1.FractionNode(b.toTree(), new numberNode_1.NumberNode(a))).toTex(),
41
+ ],
42
+ ["", "\\iff", answer],
43
+ ])}
44
+ `,
29
45
  };
30
46
  return question;
31
47
  };
@@ -60,4 +76,5 @@ exports.equationType2Exercise = {
60
76
  getPropositions,
61
77
  isAnswerValid,
62
78
  subject: "Mathématiques",
79
+ hasHintAndCorrection: true,
63
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2DF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
1
+ {"version":3,"file":"equationType3Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType3Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAgBlC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAmEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAgBvD,CAAC"}
@@ -13,6 +13,8 @@ const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode")
13
13
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
14
14
  const shuffle_1 = require("../../../../utils/shuffle");
15
15
  const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
16
+ const alignTex_1 = require("../../../../utils/alignTex");
17
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
16
18
  const getEquationType3ExerciseQuestion = () => {
17
19
  const b = (0, randint_1.randint)(-10, 11, [0]);
18
20
  const a = (0, randint_1.randint)(-10, 11, [0, 1]);
@@ -22,12 +24,22 @@ const getEquationType3ExerciseQuestion = () => {
22
24
  const statementTree = new equalNode_1.EqualNode(affine, new numberNode_1.NumberNode(c));
23
25
  const answerTree = new equalNode_1.EqualNode(new variableNode_1.VariableNode("x"), solution.toTree());
24
26
  const answer = answerTree.toTex();
27
+ const statementTex = statementTree.toTex();
25
28
  const question = {
26
- instruction: `Résoudre : $${statementTree.toTex()}$`,
29
+ instruction: `Résoudre : $${statementTex}$`,
27
30
  hint: "Isolez le terme $x$ dans la partie gauche de l'équation.",
28
31
  correction: `Commencer par soustraire $${b}$ des deux côtés de l'équation pour
29
32
  l'éliminer du côté gauche. Ensuite, diviser les deux côtés de l'équation par
30
- $${a}$ pour isoler $x$, ce qui donne : \n $ ${a}x = ${c}${b < 0 ? "+" + Math.abs(b) : "-" + Math.abs(b)} \\Leftrightarrow x=\\frac{${c}${b < 0 ? "+" + Math.abs(b) : "-" + Math.abs(b)}}{${a}} \\Leftrightarrow ${answer}$.`,
33
+ $${a}$ pour isoler $x$, ce qui donne :
34
+
35
+ ${(0, alignTex_1.alignTex)([
36
+ [
37
+ statementTex,
38
+ "\\iff",
39
+ new equalNode_1.EqualNode(new multiplyNode_1.MultiplyNode(a.toTree(), new variableNode_1.VariableNode("x")), (c - b).toTree()).toTex(),
40
+ ],
41
+ ["", "\\iff", answer],
42
+ ])}`,
31
43
  startStatement: statementTree.toTex(),
32
44
  answer,
33
45
  keys: equationKeys_1.equationKeys,
@@ -66,4 +78,5 @@ exports.equationType3Exercise = {
66
78
  getPropositions,
67
79
  isAnswerValid,
68
80
  subject: "Mathématiques",
81
+ hasHintAndCorrection: true,
69
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAelC;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2DF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
1
+ {"version":3,"file":"equationType4Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType4Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAgBlC;;GAEG;AAEH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA4EF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
@@ -13,18 +13,19 @@ const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode")
13
13
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
14
14
  const shuffle_1 = require("../../../../utils/shuffle");
15
15
  const getEquationType4ExerciseQuestion = () => {
16
- const a = (0, randint_1.randint)(-10, 11, [0]);
17
- const b = (0, randint_1.randint)(-10, 11);
16
+ const a = (0, randint_1.randint)(-10, 11, [0, 1]);
17
+ const b = (0, randint_1.randint)(-10, 11, [0]);
18
18
  const c = (0, randint_1.randint)(-10, 11, [0, a]);
19
- const d = (0, randint_1.randint)(-10, 11);
19
+ const d = (0, randint_1.randint)(-10, 11, [0]);
20
20
  const affines = [new affine_1.Affine(a, b), new affine_1.Affine(c, d)];
21
21
  const solution = new rational_1.Rational(d - b, a - c).simplify();
22
22
  const statementTree = new equalNode_1.EqualNode(affines[0].toTree(), affines[1].toTree());
23
23
  const answerTree = new equalNode_1.EqualNode(new variableNode_1.VariableNode("x"), solution.toTree());
24
24
  const answer = answerTree.toTex();
25
+ const statementTex = statementTree.toTex();
25
26
  const question = {
26
- instruction: `Résoudre : $${statementTree.toTex()}$`,
27
- startStatement: statementTree.toTex(),
27
+ instruction: `Résoudre : $${statementTex}$`,
28
+ startStatement: statementTex,
28
29
  answer,
29
30
  keys: equationKeys_1.equationKeys,
30
31
  answerFormat: "tex",
@@ -34,6 +35,20 @@ const getEquationType4ExerciseQuestion = () => {
34
35
  c: c,
35
36
  d: d,
36
37
  },
38
+ // hint: `Commence par regrouper les termes en $x$ d'un même côté de l'équation. Puis, isole $x$ en effectuant les bonnes opérations.`,
39
+ // correction: `On isole $x$ à gauche en soustrayant par $${b}$ puis en divisant par $${a}$ :
40
+ // ${alignTex([
41
+ // [
42
+ // statementTex,
43
+ // "\\iff",
44
+ // new EqualNode(
45
+ // new Affine(a, 0).toTree(),
46
+ // affines[1].add(-b).toTree(),
47
+ // ).toTex(),
48
+ // ],
49
+ // ["", "\\iff", answer],
50
+ // ])}
51
+ // `,
37
52
  };
38
53
  return question;
39
54
  };
@@ -1 +1 @@
1
- {"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6CF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
1
+ {"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAcrD,CAAC"}
@@ -6,20 +6,42 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
6
6
  const equationKeys_1 = require("../../../../exercises/utils/keys/equationKeys");
7
7
  const rational_1 = require("../../../../math/numbers/rationals/rational");
8
8
  const randint_1 = require("../../../../math/utils/random/randint");
9
+ const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
9
10
  const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equationSolutionNode");
11
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
12
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
10
13
  const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
14
+ const alignTex_1 = require("../../../../utils/alignTex");
11
15
  const shuffle_1 = require("../../../../utils/shuffle");
12
16
  const getFirstDegreeEquation = () => {
13
17
  const a = (0, randint_1.randint)(-30, 30, [0]);
14
18
  const b = (0, randint_1.randint)(-30, 30, [0]);
15
19
  const answer = `x=${new rational_1.Rational(a, b).simplify().toTree().toTex()}`;
20
+ const frac = new fractionNode_1.FractionNode(a.toTree(), "x".toTree());
21
+ const statement = new equalNode_1.EqualNode(frac, b.toTree()).toTex();
16
22
  const question = {
17
- instruction: `Résoudre l'équation suivante : $\\frac{${a}}{x} = ${b}$`,
23
+ instruction: `Résoudre l'équation suivante : $${statement}$`,
18
24
  startStatement: `x`,
19
25
  answer,
20
26
  keys: equationKeys_1.equationKeys,
21
27
  answerFormat: "tex",
22
28
  identifiers: { a, b },
29
+ hint: `Multiplie les deux côtés de l'équation par $x$, puis isole $x$ dans la partie droite de l'équation.`,
30
+ correction: `On multiplie les deux côtés de l'équation par $x$, puis on divise par $b$ :
31
+
32
+ ${(0, alignTex_1.alignTex)([
33
+ ["", `${statement}`],
34
+ [
35
+ "\\iff",
36
+ new equalNode_1.EqualNode(new multiplyNode_1.MultiplyNode("x".toTree(), frac), new multiplyNode_1.MultiplyNode("x".toTree(), b.toTree())).toTex(),
37
+ ],
38
+ [
39
+ "\\iff",
40
+ new equalNode_1.EqualNode(a.toTree(), new multiplyNode_1.MultiplyNode(b.toTree(), "x".toTree())).toTex(),
41
+ ],
42
+ ["\\iff", answer],
43
+ ])}
44
+ `,
23
45
  };
24
46
  return question;
25
47
  };
@@ -56,4 +78,5 @@ exports.firstDegreeEquation = {
56
78
  freeTimer: 60,
57
79
  isAnswerValid,
58
80
  subject: "Mathématiques",
81
+ hasHintAndCorrection: true,
59
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"firstDegreeEquationIntType1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoEF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAa7D,CAAC"}
1
+ {"version":3,"file":"firstDegreeEquationIntType1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqFF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAc7D,CAAC"}
@@ -3,20 +3,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.firstDegreeEquationIntType1 = void 0;
4
4
  const exercise_1 = require("../../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const affine_1 = require("../../../../math/polynomials/affine");
6
7
  const randint_1 = require("../../../../math/utils/random/randint");
7
8
  const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
9
+ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
10
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
8
11
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
12
+ const alignTex_1 = require("../../../../utils/alignTex");
9
13
  const getFirstDegreeEquationIntQuestion = () => {
10
14
  const a = (0, randint_1.randint)(-15, 15, [0]);
11
15
  const x = (0, randint_1.randint)(-15, 15, [0]);
12
16
  const b = a * x;
13
17
  const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("x"), x.toTree()).toTex();
18
+ const aMonom = new affine_1.Affine(a, 0).toTree();
19
+ const statementTex = new equalNode_1.EqualNode(aMonom, new numberNode_1.NumberNode(b)).toTex();
14
20
  const question = {
15
21
  answer: answer,
16
- instruction: `Résoudre l'équation suivante : $${a}x = ${b}$`,
22
+ instruction: `Résoudre l'équation suivante : $${statementTex}$`,
17
23
  keys: ["x", "equal"],
18
24
  answerFormat: "tex",
19
25
  identifiers: { a: a, x: x, b: b },
26
+ hint: `Il faut isoler $x$ à gauche. Pour cela, effectue l'opération des deux côtés de l'équation qui permet de supprimer la multiplication par $${a}$.`,
27
+ correction: `Pour isoler $x$ à gauche, on divise les deux côtés de l'équation par $${a}$:
28
+
29
+ ${(0, alignTex_1.alignTex)([
30
+ [
31
+ `${statementTex}`,
32
+ "\\iff",
33
+ new equalNode_1.EqualNode(new fractionNode_1.FractionNode(aMonom, new numberNode_1.NumberNode(a)), new fractionNode_1.FractionNode(b.toTree(), new numberNode_1.NumberNode(a))).toTex(),
34
+ ],
35
+ ["", "\\iff", answer],
36
+ ])}
37
+ `,
20
38
  };
21
39
  return question;
22
40
  };
@@ -62,4 +80,5 @@ exports.firstDegreeEquationIntType1 = {
62
80
  getPropositions,
63
81
  isAnswerValid,
64
82
  subject: "Mathématiques",
83
+ hasHintAndCorrection: true,
65
84
  };
@@ -1 +1 @@
1
- {"version":3,"file":"firstDegreeEquationIntType2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6EF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAa7D,CAAC"}
1
+ {"version":3,"file":"firstDegreeEquationIntType2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8FF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAc7D,CAAC"}
@@ -9,19 +9,34 @@ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
9
9
  const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
10
10
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
11
11
  const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
12
+ const alignTex_1 = require("../../../../utils/alignTex");
12
13
  const getFirstDegreeEquationIntQuestion = () => {
13
- const a = (0, randint_1.randint)(-15, 15, [0]);
14
+ const a = (0, randint_1.randint)(-15, 15, [0, 1]);
14
15
  const x = (0, randint_1.randint)(-15, 15, [0]);
15
- const c = (0, randint_1.randint)(-15, 15, [0]);
16
+ const c = (0, randint_1.randint)(-15, 15, [0, a * x]);
16
17
  const b = c - a * x;
17
18
  const answer = new equalNode_1.EqualNode(new variableNode_1.VariableNode("x"), x.toTree()).toTex();
18
19
  const equation = new equalNode_1.EqualNode(new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a.toTree(), new variableNode_1.VariableNode("x")), b.toTree()).simplify({ forbidFactorize: true }), c.toTree());
20
+ const statementTex = equation.toTex();
19
21
  const question = {
20
22
  answer: answer,
21
- instruction: `Résoudre l'équation suivante : $${equation.toTex()}$`,
23
+ instruction: `Résoudre l'équation suivante : $${statementTex}$`,
22
24
  keys: ["x", "equal"],
23
25
  answerFormat: "tex",
24
26
  identifiers: { a: a, x: x, c: c, b: b },
27
+ hint: "Isolez le terme $x$ dans la partie gauche de l'équation.",
28
+ correction: `Commencer par soustraire $${b}$ des deux côtés de l'équation pour
29
+ l'éliminer du côté gauche. Ensuite, diviser les deux côtés de l'équation par
30
+ $${a}$ pour isoler $x$, ce qui donne :
31
+
32
+ ${(0, alignTex_1.alignTex)([
33
+ [
34
+ statementTex,
35
+ "\\iff",
36
+ new equalNode_1.EqualNode(new multiplyNode_1.MultiplyNode(a.toTree(), new variableNode_1.VariableNode("x")), (c - b).toTree()).toTex(),
37
+ ],
38
+ ["", "\\iff", answer],
39
+ ])}`,
25
40
  };
26
41
  return question;
27
42
  };
@@ -69,4 +84,5 @@ exports.firstDegreeEquationIntType2 = {
69
84
  getPropositions,
70
85
  isAnswerValid,
71
86
  subject: "Mathématiques",
87
+ hasHintAndCorrection: true,
72
88
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/fractionEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
1
+ {"version":3,"file":"fractionEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/fractionEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+FF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
@@ -6,8 +6,11 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
6
6
  const rational_1 = require("../../../../math/numbers/rationals/rational");
7
7
  const polynomial_1 = require("../../../../math/polynomials/polynomial");
8
8
  const randint_1 = require("../../../../math/utils/random/randint");
9
+ const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
9
10
  const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equationSolutionNode");
11
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
10
12
  const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
13
+ const alignTex_1 = require("../../../../utils/alignTex");
11
14
  const shuffle_1 = require("../../../../utils/shuffle");
12
15
  const getFractionEquation = () => {
13
16
  // (ax + b)/(cx + d) = 0
@@ -17,15 +20,14 @@ const getFractionEquation = () => {
17
20
  const d = (0, randint_1.randint)(-9, 10, [0]);
18
21
  const polynome1 = new polynomial_1.Polynomial([b, a]);
19
22
  const polynome2 = new polynomial_1.Polynomial([d, c]);
20
- const answer = -d / c === -b / a
21
- ? `S=\\varnothing`
22
- : `S=\\left\\{${new rational_1.Rational(-b, a)
23
- .simplify()
24
- .toTree()
25
- .toTex()}\\right\\}`;
23
+ const root1 = new rational_1.Rational(-b, a).simplify().toTree().toTex();
24
+ const root2 = new rational_1.Rational(-d, c).simplify().toTree().toTex();
25
+ const hasSolution = -d / c !== -b / a;
26
+ const answer = -d / c === -b / a ? `S=\\varnothing` : `S=\\left\\{${root1}\\right\\}`;
27
+ const statement = new equalNode_1.EqualNode(new fractionNode_1.FractionNode(polynome1.toTree(), polynome2.toTree()), (0).toTree()).toTex();
26
28
  const question = {
27
- instruction: `Résoudre : $\\frac{${polynome1.toTex()}}{${polynome2.toTex()}} = 0$`,
28
- startStatement: `\\frac{${polynome1.toTex()}}{${polynome2.toTex()}} = 0`,
29
+ instruction: `Résoudre : $${statement}$`,
30
+ startStatement: statement,
29
31
  answer,
30
32
  keys: [
31
33
  "x",
@@ -39,6 +41,19 @@ const getFractionEquation = () => {
39
41
  ],
40
42
  answerFormat: "tex",
41
43
  identifiers: { a, b, c, d },
44
+ hint: `Un quotient est nul si est seulement si le numérateur est nul et le dénominateur est non nul. Il faut donc déterminer la valeur de $x$ qui rend le numérateur nul, sans rendre le dénominateur nul.`,
45
+ correction: `Un quotient est nul si est seulement si le numérateur est nul et le dénominateur est non nul. Ainsi :
46
+
47
+ ${(0, alignTex_1.alignTex)([
48
+ ["", statement],
49
+ ["\\iff", `${polynome1.toTex()}=0 \\text{ et } ${polynome2.toTex()}\\neq 0`],
50
+ ["\\iff", `x=${root1} \\text{ et } x\\neq ${root2}`],
51
+ ])}
52
+
53
+ ${!hasSolution
54
+ ? `Il n'y a donc pas de solution pour cette équation. Ainsi, $${answer}$.`
55
+ : `Il y a donc bien une solution pour cette équation : $${answer}$.`}
56
+ `,
42
57
  };
43
58
  return question;
44
59
  };
@@ -80,4 +95,5 @@ exports.fractionEquation = {
80
95
  getPropositions,
81
96
  isAnswerValid,
82
97
  subject: "Mathématiques",
98
+ hasHintAndCorrection: true,
83
99
  };
@@ -1 +1 @@
1
- {"version":3,"file":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"multiplicationEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/multiplicationEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA0FF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
@@ -7,7 +7,9 @@ const rational_1 = require("../../../../math/numbers/rationals/rational");
7
7
  const polynomial_1 = require("../../../../math/polynomials/polynomial");
8
8
  const randint_1 = require("../../../../math/utils/random/randint");
9
9
  const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equationSolutionNode");
10
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
10
11
  const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
12
+ const alignTex_1 = require("../../../../utils/alignTex");
11
13
  const shuffle_1 = require("../../../../utils/shuffle");
12
14
  const getMultiplicationEquation = () => {
13
15
  // (ax + b)(cx + d) = 0
@@ -24,13 +26,29 @@ const getMultiplicationEquation = () => {
24
26
  const sol2 = new rational_1.Rational(-d, c).simplify().toTree();
25
27
  const sortedSols = -b / a < -d / c ? [sol1, sol2] : [sol2, sol1];
26
28
  const answer = new equationSolutionNode_1.EquationSolutionNode(new discreteSetNode_1.DiscreteSetNode(sortedSols)).toTex();
29
+ const statementTex = new multiplyNode_1.MultiplyNode(polynome1.toTree(), polynome2.toTree()).toTex();
27
30
  const question = {
28
- instruction: `Résoudre : $(${polynome1.toTex()})(${polynome2.toTex()}) = 0$`,
29
- startStatement: `(${polynome1.toTex()})(${polynome2.toTex()}) = 0`,
31
+ instruction: `Résoudre : $${statementTex} = 0$`,
32
+ startStatement: `${statementTex} = 0`,
30
33
  answer,
31
34
  keys: ["x", "S", "equal", "lbrace", "rbrace", "semicolon", "ou"],
32
35
  answerFormat: "tex",
33
36
  identifiers: { a, b, c, d },
37
+ hint: "Un produit est nul si et seulement si un des deux facteurs est nul. Donc, il faut trouver les valeurs de $x$ qui rendent un des deux facteurs nuls.",
38
+ correction: `Un produit est nul si et seulement si un des deux facteurs est nul. On résout donc deux équations :
39
+
40
+ ${(0, alignTex_1.alignTex)([
41
+ ["", `${statementTex} = 0`],
42
+ [
43
+ "\\iff",
44
+ `${polynome1.toTree().toTex()} = 0 \\text{ ou } ${polynome2
45
+ .toTree()
46
+ .toTex()} = 0`,
47
+ ],
48
+ ["\\iff", `x=${sol1.toTex()} \\text{ ou } x=${sol2.toTex()}`],
49
+ ])}
50
+
51
+ Ainsi, $${answer}$`,
34
52
  };
35
53
  return question;
36
54
  };
@@ -76,4 +94,5 @@ exports.multiplicationEquation = {
76
94
  getPropositions,
77
95
  isAnswerValid,
78
96
  subject: "Mathématiques",
97
+ hasHintAndCorrection: true,
79
98
  };
@@ -1 +1 @@
1
- {"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
1
+ {"version":3,"file":"factoIdRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8EF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC"}
@@ -6,22 +6,41 @@ 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 numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
9
11
  const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
12
+ const alignTex_1 = require("../../../../utils/alignTex");
10
13
  const shuffle_1 = require("../../../../utils/shuffle");
11
14
  const getFactoType1Question = () => {
12
- const affine = affine_1.AffineConstructor.random(undefined, {
13
- excludes: [0],
15
+ const affine = affine_1.AffineConstructor.random({ min: 1, max: 10 }, {
16
+ min: 1,
17
+ max: 10,
14
18
  });
15
19
  const statementTree = affine.multiply(affine).toTree();
20
+ const aMonom = new affine_1.Affine(affine.a, 0).toTree();
16
21
  const answerTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
17
22
  const answer = answerTree.toTex();
23
+ const statementTex = statementTree.toTex();
18
24
  const question = {
19
- instruction: `Factoriser : $${statementTree.toTex()}$`,
20
- startStatement: statementTree.toTex(),
25
+ instruction: `Factoriser : $${statementTex}$`,
26
+ startStatement: statementTex,
21
27
  answer,
22
28
  keys: ["x"],
23
29
  answerFormat: "tex",
24
30
  identifiers: { a: affine.a, b: affine.b },
31
+ hint: `Essaie de réécrire cette expression sous la forme $a^2 + 2ab+b^2$`,
32
+ correction: `
33
+ On utilise l'identité remarquable $ a^2 + 2ab+b^2 = (a+b)^2$ en prenant $a=${aMonom.toTex()}$ et $b=${affine.b}$ :
34
+
35
+ ${(0, alignTex_1.alignTex)([
36
+ [
37
+ statementTex,
38
+ "=",
39
+ new addNode_1.AddNode(new addNode_1.AddNode(new powerNode_1.SquareNode(aMonom), new multiplyNode_1.MultiplyNode((2).toTree(), new multiplyNode_1.MultiplyNode(aMonom, affine.b.toTree()))), new powerNode_1.SquareNode(affine.b.toTree())).toTex(),
40
+ ],
41
+ ["", "=", answer],
42
+ ])}
43
+ `,
25
44
  };
26
45
  return question;
27
46
  };
@@ -54,4 +73,5 @@ exports.factoIdRmq1 = {
54
73
  getPropositions,
55
74
  isAnswerValid,
56
75
  subject: "Mathématiques",
76
+ hasHintAndCorrection: true,
57
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
1
+ {"version":3,"file":"factoIdRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+EF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC"}
@@ -6,23 +6,42 @@ 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 numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
9
+ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
9
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");
10
14
  const shuffle_1 = require("../../../../utils/shuffle");
11
15
  const getFactoType1Question = () => {
12
16
  const affine = affine_1.AffineConstructor.random({
13
- min: 0,
14
- max: 11,
15
- }, { min: -10, max: 0 });
17
+ min: 1,
18
+ max: 10,
19
+ }, { min: -9, max: 0 });
16
20
  const statementTree = affine.multiply(affine).toTree();
21
+ const statementTex = statementTree.toTex();
17
22
  const answerTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
18
23
  const answer = answerTree.toTex();
24
+ const aMonom = new affine_1.Affine(affine.a, 0).toTree();
19
25
  const question = {
20
- instruction: `Factoriser : $${statementTree.toTex()}$`,
21
- startStatement: statementTree.toTex(),
26
+ instruction: `Factoriser : $${statementTex}$`,
27
+ startStatement: statementTex,
22
28
  answer,
23
29
  keys: ["x"],
24
30
  answerFormat: "tex",
25
31
  identifiers: { a: affine.a, b: affine.b },
32
+ hint: `Essaie de réécrire cette expression sous la forme $a^2 - 2ab+b^2$`,
33
+ correction: `
34
+ On utilise l'identité remarquable $ a^2 - 2ab+b^2 = (a-b)^2$ en prenant $a=${aMonom.toTex()}$ et $b=${-affine.b}$ :
35
+
36
+ ${(0, alignTex_1.alignTex)([
37
+ [
38
+ statementTex,
39
+ "=",
40
+ new addNode_1.AddNode(new substractNode_1.SubstractNode(new powerNode_1.SquareNode(aMonom), new multiplyNode_1.MultiplyNode((2).toTree(), new multiplyNode_1.MultiplyNode(aMonom, (-affine.b).toTree()))), new powerNode_1.SquareNode((-affine.b).toTree())).toTex(),
41
+ ],
42
+ ["", "=", answer],
43
+ ])}
44
+ `,
26
45
  };
27
46
  return question;
28
47
  };
@@ -56,4 +75,5 @@ exports.factoIdRmq2 = {
56
75
  getPropositions,
57
76
  isAnswerValid,
58
77
  subject: "Mathématiques",
78
+ hasHintAndCorrection: true,
59
79
  };
@@ -1 +1 @@
1
- {"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAgFF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAa7C,CAAC"}
1
+ {"version":3,"file":"factoIdRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factoIdRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAmGF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC"}