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
@@ -84,8 +84,9 @@ export interface Exercise<TIdentifiers = {}> {
84
84
  isGGBAnswerValid?: GGBVEA<TIdentifiers>;
85
85
  hasGeogebra?: boolean;
86
86
  subject: "Mathématiques" | "Chimie" | "Physique";
87
+ hasHintAndCorrection?: boolean;
87
88
  }
88
89
  export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
89
90
  export type MathSection = "Aires" | "Arithmétique" | "Calcul littéral" | "Calculs" | "Combinatoire et dénombrement" | "Conversions" | "Dérivation" | "Droites" | "Ensembles et intervalles" | "Équations" | "Équations différentielles" | "Exponentielle" | "Fonction cube" | "Fonction inverse" | "Fonctions" | "Fonctions affines" | "Fonctions de référence" | "Fractions" | "Géométrie cartésienne" | "Géométrie euclidienne" | "Inéquations" | "Intégration" | "Limites" | "Logarithme népérien" | "Logarithme décimal" | "Matrices" | "Nombres complexes" | "Périmètres" | "Pourcentages" | "Primitives" | "Probabilités" | "Produit scalaire" | "Proportionnalité" | "Python" | "Puissances" | "Python" | "Racines carrées" | "Second degré" | "Statistiques" | "Suites" | "Systèmes" | "Théorème de Pythagore" | "Théorème de Thalès" | "Trigonométrie" | "Valeur absolue" | "Vecteurs";
90
- export type PCSection = "Réaction chimique" | "Chimie des solutions" | "Forces" | "Chimie organique" | "Mécanique" | "Lumière" | "Acide / Base" | "Constitution et transformations de la matière" | "Ondes" | "Son" | "Corps purs et mélanges" | "Fluides" | "Mol" | "Électricité" | "Spectrophotométrie" | "Quantique";
91
+ export type PCSection = "Réaction chimique" | "Chimie des solutions" | "Forces" | "Chimie organique" | "Mécanique" | "Lumière" | "Acide / Base" | "Constitution et transformations de la matière" | "Ondes" | "Son" | "Corps purs et mélanges" | "Fluides" | "Mol" | "Électricité" | "Mécanique gravitationnelle" | "Spectrophotométrie" | "Quantique" | "Thermodynamique" | "Énergie";
91
92
  //# sourceMappingURL=exercise.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ,CAAC,YAAY,GAAG,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CA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AAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const decimal_1 = require("../../../math/numbers/decimals/decimal");
7
7
  const randint_1 = require("../../../math/utils/random/randint");
8
+ const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
8
9
  const getDigitDecimalRankQuestion = () => {
9
10
  const decimalPartSize = (0, randint_1.randint)(2, 5);
10
11
  const nb = decimal_1.DecimalConstructor.random(0, 1000, decimalPartSize);
@@ -20,6 +21,8 @@ const getDigitDecimalRankQuestion = () => {
20
21
  keys: [],
21
22
  answerFormat: "tex",
22
23
  identifiers: { nb: nb.tex, rankAsked },
24
+ hint: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre après la virgule.`,
25
+ correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre après la virgule. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
23
26
  };
24
27
  return question;
25
28
  };
@@ -38,9 +41,6 @@ const getPropositions = (n, { answer, nb }) => {
38
41
  const isAnswerValid = (ans, { answer }) => {
39
42
  return ans === answer;
40
43
  };
41
- const isGGBAnswerValid = (ans, { ggbAnswer }) => {
42
- throw Error("GGBVea not implemented");
43
- };
44
44
  exports.digitDecimalRank = {
45
45
  id: "digitDecimalRank",
46
46
  connector: "=",
@@ -53,6 +53,6 @@ exports.digitDecimalRank = {
53
53
  freeTimer: 60,
54
54
  getPropositions,
55
55
  isAnswerValid,
56
- isGGBAnswerValid,
57
56
  subject: "Mathématiques",
57
+ hasHintAndCorrection: true,
58
58
  };
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const integer_1 = require("../../../math/numbers/integer/integer");
7
7
  const randint_1 = require("../../../math/utils/random/randint");
8
+ const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
8
9
  const getDigitRankQuestion = () => {
9
10
  const size = (0, randint_1.randint)(3, 6);
10
11
  const nb = integer_1.IntegerConstructor.random(size);
@@ -18,6 +19,8 @@ const getDigitRankQuestion = () => {
18
19
  .toTree()
19
20
  .toTex()}$ ?`,
20
21
  keys: [],
22
+ hint: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite.`,
23
+ correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
21
24
  answerFormat: "tex",
22
25
  identifiers: { nb, rankAsked },
23
26
  };
@@ -38,9 +41,6 @@ const getPropositions = (n, { answer, nb }) => {
38
41
  const isAnswerValid = (ans, { answer }) => {
39
42
  return ans === answer;
40
43
  };
41
- const isGGBAnswerValid = (ans, { ggbAnswer }) => {
42
- throw Error("GGBVea not implemented");
43
- };
44
44
  exports.digitRank = {
45
45
  id: "digitRank",
46
46
  connector: "=",
@@ -53,6 +53,6 @@ exports.digitRank = {
53
53
  freeTimer: 60,
54
54
  getPropositions,
55
55
  isAnswerValid,
56
- isGGBAnswerValid,
57
56
  subject: "Mathématiques",
57
+ hasHintAndCorrection: true,
58
58
  };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ nb: number;
4
+ rankAsked: number;
5
+ };
6
+ export declare const digitRankNumber: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=digitRankNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digitRankNumber.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRankNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA8CF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.digitRankNumber = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const integer_1 = require("../../../math/numbers/integer/integer");
7
+ const randint_1 = require("../../../math/utils/random/randint");
8
+ const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
9
+ const getDigitRankNumberQuestion = () => {
10
+ const size = (0, randint_1.randint)(3, 6);
11
+ const nb = integer_1.IntegerConstructor.random(size);
12
+ const rankAsked = (0, randint_1.randint)(0, Math.min(size, 4));
13
+ const rankAskedLabel = integer_1.integerDigitRanks[rankAsked];
14
+ const nbString = nb.toString();
15
+ const answer = nbString.substring(0, nbString.length - rankAsked);
16
+ const question = {
17
+ answer,
18
+ instruction: `Quel est le nombre ${rankAsked === 0 ? "d'" : "de "}${rankAskedLabel} dans le nombre $${nb.toTree().toTex()}$ ?`,
19
+ keys: [],
20
+ hint: `Attention ! On demande le 'nombre' et non pas le 'chiffre' !`,
21
+ correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
22
+ answerFormat: "tex",
23
+ identifiers: { nb, rankAsked },
24
+ };
25
+ return question;
26
+ };
27
+ const getPropositions = (n, { answer, nb, rankAsked }) => {
28
+ const propositions = [];
29
+ (0, exercise_1.addValidProp)(propositions, answer);
30
+ const nbString = nb.toString();
31
+ (0, exercise_1.tryToAddWrongProp)(propositions, nbString[nbString.length - rankAsked - 1]);
32
+ for (let i = 0; i < nbString.length; i++) {
33
+ (0, exercise_1.tryToAddWrongProp)(propositions, nbString.substring(0, nbString.length - i));
34
+ }
35
+ while (propositions.length < n) {
36
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 100) + "");
37
+ }
38
+ return (0, exercise_1.shuffleProps)(propositions, n);
39
+ };
40
+ const isAnswerValid = (ans, { answer }) => {
41
+ return ans === answer;
42
+ };
43
+ exports.digitRankNumber = {
44
+ id: "digitRankNumber",
45
+ connector: "=",
46
+ label: "Déterminer le rang d'un chiffre dans un nombre entier",
47
+ levels: [],
48
+ isSingleStep: true,
49
+ sections: [],
50
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDigitRankNumberQuestion, nb),
51
+ qcmTimer: 60,
52
+ freeTimer: 60,
53
+ getPropositions,
54
+ isAnswerValid,
55
+ subject: "Mathématiques",
56
+ hasHintAndCorrection: true,
57
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAwClC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAyCF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
1
+ {"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0FlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAyCF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
@@ -7,6 +7,7 @@ const integer_1 = require("../../../../math/numbers/integer/integer");
7
7
  const rational_1 = require("../../../../math/numbers/rationals/rational");
8
8
  const randint_1 = require("../../../../math/utils/random/randint");
9
9
  const divideNode_1 = require("../../../../tree/nodes/operators/divideNode");
10
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
10
11
  const coinFlip_1 = require("../../../../utils/coinFlip");
11
12
  const getFractionAndIntegerDivision = () => {
12
13
  const rational = rational_1.RationalConstructor.randomIrreductible();
@@ -21,11 +22,43 @@ const getFractionAndIntegerDivision = () => {
21
22
  ? integer.divide(rational).toTree()
22
23
  : rational.divide(integer).toTree();
23
24
  const answerTex = answerTree.toTex();
25
+ const beforeSimplification = integerFirst
26
+ ? new rational_1.Rational(integer.value * rational.denum, rational.num)
27
+ : new rational_1.Rational(rational.num, rational.denum * integer.value);
24
28
  const question = {
25
29
  instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
26
30
  startStatement: statementTree.toTex(),
27
31
  answer: answerTex,
28
32
  keys: [],
33
+ hint: "Pour diviser une fraction par un nombre entier, on peut écrire le nombre entier sous forme de fraction. Puis, on multiplie la première fraction par l'inverse de la seconde. Enfin, on simplife la fraction obtenue si possible.",
34
+ correction: `
35
+ On écrit $${integer.value}$ sous forme de fraction :
36
+
37
+ $${integer.value} = \\frac{${integer.value}}{1}$
38
+
39
+ On multiplie la première fraction par l'inverse de la seconde :
40
+
41
+ ${integerFirst
42
+ ? `$\\frac{${integer.value}}{1}\\div ${rational
43
+ .toTree()
44
+ .toTex()} = \\frac{${integer.value}}{1} \\times ${rational
45
+ .reverse(false)
46
+ .toTree()
47
+ .toTex()} = \\frac{${new multiplyNode_1.MultiplyNode(integer.toTree(), rational.denum.toTree()).toTex({ forceNoSimplification: true })}}{${new multiplyNode_1.MultiplyNode((1).toTree(), rational.num.toTree()).toTex({ forceNoSimplification: true })}}
48
+ = ${beforeSimplification.toTree().toTex()}$`
49
+ : `$${rational.toTree().toTex()}\\div \\frac{${integer.value}}{1} = ${rational.toTree().toTex()}\\times \\frac{1}{${integer.value}} = \\frac{${rational.num}\\times 1}{${new multiplyNode_1.MultiplyNode(rational.denum.toTree(), integer.toTree()).toTex({ forceNoSimplification: true })}} = ${beforeSimplification
50
+ .toTree()
51
+ .toTex()}$`}
52
+
53
+ ${!beforeSimplification.isIrreductible()
54
+ ? `On peut alors simplifier cette fraction :
55
+
56
+ $${beforeSimplification.toTree().toTex()} = ${answerTex}$
57
+ `
58
+ : "Cette fraction est déjà irréductible."}
59
+
60
+ Ainsi, le résultat attendu est $${answerTex}$.
61
+ `,
29
62
  answerFormat: "tex",
30
63
  identifiers: {
31
64
  integerFirst,
@@ -75,4 +108,5 @@ exports.fractionAndIntegerDivision = {
75
108
  getPropositions,
76
109
  isAnswerValid,
77
110
  subject: "Mathématiques",
111
+ hasHintAndCorrection: true,
78
112
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAiClC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAsCF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAc3D,CAAC"}
1
+ {"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA2DlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAsCF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
@@ -15,12 +15,28 @@ const getFractionAndIntegerProduct = () => {
15
15
  statementTree.shuffle();
16
16
  const answerTree = rational.multiply(integer).toTree();
17
17
  const answer = answerTree.toTex();
18
+ const beforeSimplification = new rational_1.Rational(rational.num * integer.value, rational.denum);
18
19
  const question = {
19
20
  instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
20
21
  startStatement: statementTree.toTex(),
21
22
  answer,
22
23
  keys: [],
23
24
  answerFormat: "tex",
25
+ hint: "Pour multiplier une fraction par un nombre entier, on multiplie le numérateur de la fraction par le nombre entier, sans toucher au dénominateur. On simplifie ensuite la fraction obtenue si possible.",
26
+ correction: `
27
+ On multiplie le numérateur de la fraction par le nombre entier :
28
+
29
+ $${statementTree.toTex()} = \\frac{${new multiplyNode_1.MultiplyNode(rational.num.toTree(), integer.toTree()).toTex({ forceNoSimplification: true })}}{${rational.denum}} = ${beforeSimplification.toTree().toTex()}$
30
+
31
+ ${!beforeSimplification.isIrreductible()
32
+ ? `On peut alors simplifier cette fraction :
33
+
34
+ $${beforeSimplification.toTree().toTex()} = ${answer}$
35
+ `
36
+ : "Cette fraction est déjà irréductible."}
37
+
38
+ Ainsi, le résultat attendu est $${answer}$.
39
+ `,
24
40
  identifiers: {
25
41
  integer: integer.value,
26
42
  rational: [rational.num, rational.denum],
@@ -65,5 +81,6 @@ exports.fractionAndIntegerProduct = {
65
81
  freeTimer: 60,
66
82
  getPropositions,
67
83
  isAnswerValid,
84
+ hasHintAndCorrection: true,
68
85
  subject: "Mathématiques",
69
86
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA6BlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAwCF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAanD,CAAC"}
1
+ {"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA0DlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAwCF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAcnD,CAAC"}
@@ -12,12 +12,34 @@ const getFractionsDivision = () => {
12
12
  const statementTree = new divideNode_1.DivideNode(rational.toTree(), rational2.toTree());
13
13
  const answerTree = rational.divide(rational2).toTree();
14
14
  const answer = answerTree.toTex();
15
+ const beforeSimplification = new rational_1.Rational(rational.num * rational2.denum, rational.denum * rational2.num);
16
+ const isSimplifiable = !beforeSimplification.isIrreductible();
15
17
  const question = {
16
18
  instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
17
19
  startStatement: statementTree.toTex(),
18
20
  answer,
19
21
  keys: [],
20
22
  answerFormat: "tex",
23
+ hint: "Pour diviser par une fraction, il faut multiplier la première fraction par l'inverse de la deuxième. Simplifie ensuite la fraction obtenue si nécessaire.",
24
+ correction: `On multiplie la première fraction par l'inverse de la deuxième :
25
+
26
+ $$${statementTree.toTex()} = ${rational.toTree().toTex()}\\times ${rational2
27
+ .reverse(false)
28
+ .toTree()
29
+ .toTex()}$$
30
+
31
+ Multiplions les fractions :
32
+
33
+ $$\\frac{${rational.num}\\times${rational2.denum}}{${rational.denum}\\times${rational2.num}} = ${beforeSimplification.toTree().toTex()}$$
34
+
35
+ ${isSimplifiable
36
+ ? `On peut alors simplifier cette fraction :
37
+
38
+ $${beforeSimplification.toTree().toTex()} = ${answer}$`
39
+ : "Cette fraction est déjà sous forme irréductible."}
40
+
41
+ Ainsi, le résultat attendu est $${answer}$.
42
+ `,
21
43
  identifiers: {
22
44
  rationalNum: [rational.num, rational.denum],
23
45
  rationalDenum: [rational2.num, rational2.denum],
@@ -60,4 +82,5 @@ exports.fractionsDivision = {
60
82
  getPropositions,
61
83
  isAnswerValid,
62
84
  subject: "Mathématiques",
85
+ hasHintAndCorrection: true,
63
86
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAqDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
1
+ {"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AA0EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
@@ -12,6 +12,7 @@ const getFractionsProduct = () => {
12
12
  const statementTree = new multiplyNode_1.MultiplyNode(rational.toTree(), rational2.toTree());
13
13
  const answerTree = rational.multiply(rational2).toTree();
14
14
  const answer = answerTree.toTex();
15
+ const beforeSimplification = new rational_1.Rational(rational.num * rational2.num, rational.denum * rational2.denum);
15
16
  const question = {
16
17
  instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
17
18
  startStatement: statementTree.toTex(),
@@ -22,6 +23,19 @@ const getFractionsProduct = () => {
22
23
  rationalNum: [rational.num, rational.denum],
23
24
  rationalDenum: [rational2.num, rational2.denum],
24
25
  },
26
+ hint: "Pour multiplier deux fractions, on multiplie les numérateurs entre eux et les dénominateurs entre eux, puis on simplifie la fraction obtenue si nécessaire.",
27
+ correction: `On multiplie les numérateurs entre eux et les dénominateurs entre eux :
28
+
29
+ $$\\frac{${rational.num}\\times${rational2.num}}{${rational.denum}\\times${rational2.denum}} = ${beforeSimplification.toTree().toTex()}$$
30
+
31
+ ${!beforeSimplification.isIrreductible()
32
+ ? `On peut alors simplifier cette fraction :
33
+
34
+ $${beforeSimplification.toTree().toTex()} = ${answer}$`
35
+ : "Cette fraction est déjà sous forme irréductible."}
36
+
37
+ Ainsi, le résultat attendu est $${answer}$.
38
+ `,
25
39
  };
26
40
  return question;
27
41
  };
@@ -58,4 +72,5 @@ exports.fractionsProduct = {
58
72
  getPropositions,
59
73
  isAnswerValid,
60
74
  subject: "Mathématiques",
75
+ hasHintAndCorrection: true,
61
76
  };
@@ -8,4 +8,5 @@ export * from "./proportionality";
8
8
  export * from "./rounding";
9
9
  export * from "./digitRank";
10
10
  export * from "./digitDecimalRank";
11
+ export * from "./digitRankNumber";
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
@@ -24,3 +24,4 @@ __exportStar(require("./proportionality"), exports);
24
24
  __exportStar(require("./rounding"), exports);
25
25
  __exportStar(require("./digitRank"), exports);
26
26
  __exportStar(require("./digitDecimalRank"), exports);
27
+ __exportStar(require("./digitRankNumber"), exports);
@@ -1,3 +1,5 @@
1
1
  export * from "./proportionalityTable";
2
2
  export * from "./proportionalityTableCoefficient";
3
+ export * from "./scaleCalculation";
4
+ export * from "./scaleUsage";
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
@@ -16,3 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./proportionalityTable"), exports);
18
18
  __exportStar(require("./proportionalityTableCoefficient"), exports);
19
+ __exportStar(require("./scaleCalculation"), exports);
20
+ __exportStar(require("./scaleUsage"), exports);
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ scale: number;
4
+ isSmallScale: boolean;
5
+ fakeDistance: number;
6
+ };
7
+ export declare const scaleCalculation: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=scaleCalculation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaleCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/scaleCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IAEtB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAmFF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scaleCalculation = 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 randint_1 = require("../../../../math/utils/random/randint");
8
+ const measure_1 = require("../../../../pc/measure/measure");
9
+ const distanceUnits_1 = require("../../../../pc/units/distanceUnits");
10
+ const coinFlip_1 = require("../../../../utils/coinFlip");
11
+ const getScaleCalculationQuestion = () => {
12
+ const isSmallScale = (0, coinFlip_1.coinFlip)();
13
+ const scale = isSmallScale ? (0, randint_1.randint)(1, 5) * 10 : (0, randint_1.randint)(5, 100) * 1000;
14
+ const realUnit = isSmallScale ? distanceUnits_1.DistanceUnit.m : distanceUnits_1.DistanceUnit.km;
15
+ const cm = distanceUnits_1.DistanceUnit.cm;
16
+ const fakeDistanceNb = isSmallScale ? (0, randint_1.randint)(5, 100) : (0, randint_1.randint)(1, 100);
17
+ const fakeDistance = new measure_1.Measure(fakeDistanceNb, 0, cm);
18
+ const realDistanceNb = (scale * fakeDistance.evaluate()) / (isSmallScale ? 100 : 100000);
19
+ const realDistance = new measure_1.Measure(realDistanceNb, 0, realUnit);
20
+ const instruction = isSmallScale
21
+ ? `Un bateau de $${realDistance.toTex({
22
+ notScientific: true,
23
+ })}$ est représenté par un modèle réduit de $${fakeDistance.toTex({
24
+ notScientific: true,
25
+ })}$. Quelle est l'échelle du modèle réduit ?`
26
+ : `La distance entre deux villes est de $${realDistance.toTex({
27
+ notScientific: true,
28
+ })}$. Sur une carte, cette distance mesure $${fakeDistance.toTex({
29
+ notScientific: true,
30
+ })}$. Quelle est l'échelle de la carte ?`;
31
+ const answer = new rational_1.Rational(1, scale).toTex();
32
+ const question = {
33
+ answer,
34
+ instruction,
35
+ keys: [],
36
+ answerFormat: "tex",
37
+ hint: `Convertis les longueurs en $${cm.toTex()}$, puis fais un calcul de propotionnalité.`,
38
+ correction: `On convertit d'abord les longueurs en cm :
39
+
40
+ $${realDistance.toTex({ notScientific: true })} = ${realDistance
41
+ .convert("cm")
42
+ .toTex({ notScientific: true })}$
43
+
44
+ Puis, on fait un calcul de proportionnalité : puisque $${fakeDistance.toTex({
45
+ notScientific: true,
46
+ })}$ représentent $${realDistance.convert("cm").toTex({
47
+ notScientific: true,
48
+ })}$ réels, alors $1${cm.toTex()}$ représente $\\frac{${realDistance
49
+ .convert("cm")
50
+ .toTex({ notScientific: true, hideUnit: true })}}{${fakeDistance.toTex({
51
+ notScientific: true,
52
+ hideUnit: true,
53
+ })}}=${scale}${cm.toTex()}$ réels.
54
+
55
+ L'échelle est donc de $${answer}$.
56
+ `,
57
+ identifiers: {
58
+ scale,
59
+ fakeDistance: fakeDistanceNb,
60
+ isSmallScale,
61
+ },
62
+ };
63
+ return question;
64
+ };
65
+ const getPropositions = (n, { answer, scale, isSmallScale }) => {
66
+ const propositions = [];
67
+ (0, exercise_1.addValidProp)(propositions, answer);
68
+ while (propositions.length < n) {
69
+ (0, exercise_1.tryToAddWrongProp)(propositions, new rational_1.Rational(1, isSmallScale ? (0, randint_1.randint)(1, 5) * 10 : (0, randint_1.randint)(5, 100) * 1000).toTex());
70
+ }
71
+ return (0, exercise_1.shuffleProps)(propositions, n);
72
+ };
73
+ const isAnswerValid = (ans, { answer }) => {
74
+ return ans === answer;
75
+ };
76
+ exports.scaleCalculation = {
77
+ id: "scaleCalculation",
78
+ connector: "=",
79
+ label: "Calculer une échelle",
80
+ levels: [],
81
+ isSingleStep: true,
82
+ sections: [],
83
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScaleCalculationQuestion, nb),
84
+ qcmTimer: 60,
85
+ freeTimer: 60,
86
+ getPropositions,
87
+ isAnswerValid,
88
+ subject: "Mathématiques",
89
+ hasHintAndCorrection: true,
90
+ };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ scale: number;
4
+ isSmallScale: boolean;
5
+ fakeDistance: number;
6
+ };
7
+ export declare const scaleUsage: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=scaleUsage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scaleUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/scaleUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IAEtB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAiGF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAc5C,CAAC"}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.scaleUsage = 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 randint_1 = require("../../../../math/utils/random/randint");
8
+ const measure_1 = require("../../../../pc/measure/measure");
9
+ const distanceUnits_1 = require("../../../../pc/units/distanceUnits");
10
+ const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
11
+ const coinFlip_1 = require("../../../../utils/coinFlip");
12
+ const getScaleUsageQuestion = () => {
13
+ const isSmallScale = (0, coinFlip_1.coinFlip)();
14
+ const isFakeAsked = (0, coinFlip_1.coinFlip)();
15
+ const scale = isSmallScale ? (0, randint_1.randint)(1, 5) * 10 : (0, randint_1.randint)(5, 100) * 1000;
16
+ const realUnit = isSmallScale ? distanceUnits_1.DistanceUnit.m : distanceUnits_1.DistanceUnit.km;
17
+ const cm = distanceUnits_1.DistanceUnit.cm;
18
+ const fakeDistanceNb = isSmallScale ? (0, randint_1.randint)(5, 100) : (0, randint_1.randint)(1, 100);
19
+ const fakeDistance = new measure_1.Measure(fakeDistanceNb, 0, cm);
20
+ const realDistanceNb = (scale * fakeDistance.evaluate()) / (isSmallScale ? 100 : 100000);
21
+ const realDistance = new measure_1.Measure(realDistanceNb, 0, realUnit);
22
+ const scaleFrac = new rational_1.Rational(1, scale).toTex();
23
+ const answer = (isFakeAsked ? fakeDistanceNb : realDistanceNb).frenchify();
24
+ const instruction = `Une carte est à l'échelle $${scaleFrac}$. ${!isFakeAsked
25
+ ? `Quelle est la distance réelle représentée par $${fakeDistance.toTex({
26
+ notScientific: true,
27
+ })}$ sur cette carte ? Donner la réponse en $${realUnit.toTex()}$.`
28
+ : `Quelle est la distance représentée sur la carte pour une distance réelle de $${realDistance.toTex({ notScientific: true })}$ ? Donner la distance en $${cm.toTex()}$.`}`;
29
+ const question = {
30
+ answer,
31
+ instruction,
32
+ keys: [],
33
+ answerFormat: "tex",
34
+ hint: `La carte est à l'échelle $${scaleFrac}$ : cela signifie que $1${cm.toTex()}$ sur cette carte représente $${scale}${cm.toTex()}$ dans la réalité. Il faut donc faire un calcul de proportionnalité.`,
35
+ correction: `La carte est à l'échelle $${scaleFrac}$ : cela signifie que $1${cm.toTex()}$ sur cette carte représente $${scale}${cm.toTex()}$ dans la réalité.
36
+
37
+ ${isFakeAsked
38
+ ? `
39
+ On convertit d'abord la distance réelle en $${cm.toTex()}$ :
40
+
41
+
42
+ $${realDistance.toTex({ notScientific: true })} = ${realDistance
43
+ .convert("cm")
44
+ .toTex({ notScientific: true })}$
45
+
46
+ Ainsi, $${realDistance.toTex({
47
+ notScientific: true,
48
+ })}$ dans la réalité représentent $\\frac{
49
+ ${realDistance.convert("cm").toTex({
50
+ notScientific: true,
51
+ })}}{${scale}} = ${fakeDistance.toTex({
52
+ notScientific: true,
53
+ })}$ sur la carte.`
54
+ : `
55
+ Donc, $${fakeDistance.toTex({
56
+ notScientific: true,
57
+ })}$ sur la carte représentent $${new multiplyNode_1.MultiplyNode(fakeDistanceNb.toTree(), scale.toTree()).toTex()} = ${realDistance.convert("cm").toTex({
58
+ notScientific: true,
59
+ })}$ dans la réalité. On convertit alors en $${realUnit.toTex()}$ : la distance réelle est donc $${answer}${realUnit.toTex()}$.`}
60
+
61
+ `,
62
+ identifiers: {
63
+ scale,
64
+ fakeDistance: fakeDistanceNb,
65
+ isSmallScale,
66
+ },
67
+ };
68
+ return question;
69
+ };
70
+ const getPropositions = (n, { answer, scale, isSmallScale }) => {
71
+ const propositions = [];
72
+ (0, exercise_1.addValidProp)(propositions, answer);
73
+ while (propositions.length < n) {
74
+ (0, exercise_1.tryToAddWrongProp)(propositions, new rational_1.Rational(1, isSmallScale ? (0, randint_1.randint)(1, 5) * 10 : (0, randint_1.randint)(5, 100) * 1000).toTex());
75
+ }
76
+ return (0, exercise_1.shuffleProps)(propositions, n);
77
+ };
78
+ const isAnswerValid = (ans, { answer }) => {
79
+ return ans === answer;
80
+ };
81
+ exports.scaleUsage = {
82
+ id: "scaleUsage",
83
+ connector: "=",
84
+ label: "Utiliser une échelle",
85
+ levels: [],
86
+ isSingleStep: true,
87
+ sections: [],
88
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScaleUsageQuestion, nb),
89
+ qcmTimer: 60,
90
+ freeTimer: 60,
91
+ getPropositions,
92
+ isAnswerValid,
93
+ subject: "Mathématiques",
94
+ hasHintAndCorrection: true,
95
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA8ClC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAc7C,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAiB9C,CAAC"}
1
+ {"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAuElC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAe7C,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAkB9C,CAAC"}