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
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ import { Measure } from "../../../pc/measure/measure";
3
+ type Identifiers = {
4
+ planet: string;
5
+ mass: Measure;
6
+ distance: Measure;
7
+ };
8
+ export declare const gravitationalForcePlanets: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=gravitationalForcePlanets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gravitationalForcePlanets.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/gravitationalForcePlanets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAOnD,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAiJF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAgB3D,CAAC"}
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.gravitationalForcePlanets = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const randint_1 = require("../../../math/utils/random/randint");
7
+ const measure_1 = require("../../../pc/measure/measure");
8
+ const planets_1 = require("../../../pc/constants/mechanics/planets");
9
+ const gravitational_1 = require("../../../pc/constants/mechanics/gravitational");
10
+ const G = gravitational_1.earthG.measure;
11
+ const getGravitationalForcePlanetsQuestion = () => {
12
+ const planetIndex = (0, randint_1.randint)(0, planets_1.planets.length);
13
+ const selectedPlanet = planets_1.planets[planetIndex];
14
+ const massSun = gravitational_1.sunMass.measure;
15
+ // Convert distance from km to m
16
+ const distanceInMeters = selectedPlanet.distanceFromSun.convert("m");
17
+ const force = G.times(selectedPlanet.mass)
18
+ .times(massSun)
19
+ .divide(distanceInMeters.times(distanceInMeters))
20
+ .toSignificant(2);
21
+ const instruction = `Considérez la planète ${selectedPlanet.name} dans le ${selectedPlanet.system}.
22
+ La masse de ${selectedPlanet.name} est de $${selectedPlanet.mass.toTex({
23
+ scientific: 2,
24
+ })}$ et la distance entre ${selectedPlanet.name} et le Soleil est de $${selectedPlanet.distanceFromSun.toTex({
25
+ scientific: 2,
26
+ })}$.
27
+ Calculez la force gravitationnelle exercée par le Soleil sur ${selectedPlanet.name}.
28
+
29
+ Données:
30
+ - Constante de gravitation universelle: $G = ${G.toTex({
31
+ scientific: 2,
32
+ })}$
33
+ - Masse du Soleil: $m_{\\text{soleil}} = ${massSun.toTex({
34
+ scientific: 2,
35
+ })}$`;
36
+ const hint = `Utilisez la formule de la force gravitationnelle.`;
37
+ const correction = `La force gravitationnelle est donnée par la formule vectorielle :
38
+ $$\\vec{F}_{\\text{Soleil/${selectedPlanet.name}}} = -G \\cdot \\frac{m_{\\text{soleil}} \\cdot m_{${selectedPlanet.name.charAt(0)}}}{d^2} \\cdot \\vec{u}_{\\text{Soleil→${selectedPlanet.name}}}$$. \n
39
+ La formule de la force gravitationnelle en valeur est :
40
+ $$F_{\\text{Soleil/${selectedPlanet.name}}} = G \\cdot \\frac{m_{\\text{soleil}} \\cdot m_{${selectedPlanet.name.charAt(0)}}}{d^2}$$. \n
41
+ En utilisant les valeurs fournies :
42
+ $$F_{\\text{Soleil/${selectedPlanet.name}}} = ${G.toTex({
43
+ scientific: 2,
44
+ })} \\cdot \\frac{${selectedPlanet.mass.toTex({
45
+ scientific: 2,
46
+ })} \\cdot ${massSun.toTex({
47
+ scientific: 2,
48
+ })}}{(${distanceInMeters.toTex({
49
+ scientific: 2,
50
+ })})^2} = ${force.toTex({ scientific: 2 })}$$. \n
51
+ Donc, la force gravitationnelle exercée par le Soleil sur ${selectedPlanet.name} est $${force.toTex({ scientific: 2 })}$.`;
52
+ const question = {
53
+ answer: force.toTex({ scientific: 2 }),
54
+ instruction,
55
+ hint,
56
+ correction,
57
+ keys: ["N", "timesTenPower"],
58
+ answerFormat: "tex",
59
+ identifiers: {
60
+ planet: selectedPlanet.name,
61
+ mass: selectedPlanet.mass,
62
+ distance: selectedPlanet.distanceFromSun,
63
+ },
64
+ };
65
+ return question;
66
+ };
67
+ const getPropositions = (n, { answer, mass, distance }) => {
68
+ const propositions = [];
69
+ (0, exercise_1.addValidProp)(propositions, answer);
70
+ const massSun = gravitational_1.sunMass.measure;
71
+ const distanceInMeters = distance.times(1000);
72
+ const correctAnswer = G.times(mass)
73
+ .times(massSun)
74
+ .divide(distanceInMeters.times(distanceInMeters))
75
+ .toSignificant(2);
76
+ const wrongAnswer1 = G.times(mass)
77
+ .times(massSun)
78
+ .divide(distance.times(distance))
79
+ .toSignificant(2);
80
+ const wrongAnswer2 = G.times(mass)
81
+ .times(massSun)
82
+ .times(distanceInMeters.times(distanceInMeters))
83
+ .toSignificant(2);
84
+ const wrongAnswer3 = G.times(mass)
85
+ .times(massSun)
86
+ .divide(distanceInMeters)
87
+ .toSignificant(2);
88
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer1.toTex({ scientific: 2, hideUnit: true }) + "\\ \\text{N}");
89
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer2.toTex({ scientific: 2, hideUnit: true }) + "\\ \\text{N}");
90
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer3.toTex({ scientific: 2, hideUnit: true }) + "\\ \\text{N}");
91
+ while (propositions.length < n) {
92
+ const errorFactor = new measure_1.Measure(1, (0, randint_1.randint)(1, 5));
93
+ const wrongAnswer = correctAnswer.times(errorFactor);
94
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toTex({ scientific: 2 }) + "\\ \\text{N}");
95
+ }
96
+ return (0, exercise_1.shuffleProps)(propositions, n);
97
+ };
98
+ const isAnswerValid = (ans, { answer }) => {
99
+ if (ans === answer)
100
+ return true;
101
+ return [answer.replace("\\ N", "N"), answer.replace("\\ N", "")].includes(ans);
102
+ };
103
+ exports.gravitationalForcePlanets = {
104
+ id: "gravitationalForcePlanets",
105
+ connector: "=",
106
+ label: "Calculer la force gravitationnelle entre le Soleil et une planète",
107
+ levels: ["2nde"],
108
+ isSingleStep: true,
109
+ sections: ["Mécanique gravitationnelle"],
110
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGravitationalForcePlanetsQuestion, nb, 8),
111
+ qcmTimer: 60,
112
+ freeTimer: 60,
113
+ getPropositions,
114
+ isAnswerValid,
115
+ subject: "Physique",
116
+ maxAllowedQuestions: 8,
117
+ hasHintAndCorrection: true,
118
+ };
@@ -1,4 +1,9 @@
1
1
  export * from "./gravitationalAttractionValue";
2
2
  export * from "./forceWork";
3
3
  export * from "./pressingForce";
4
+ export * from "./calculateNormalOrFrictionForce";
5
+ export * from "./massWeight";
6
+ export * from "./gravitationalForcePlanets";
7
+ export * from "./gravitationalAttractionObjectHeight";
8
+ export * from "./electroStaticForce";
4
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,sBAAsB,CAAC"}
@@ -17,3 +17,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./gravitationalAttractionValue"), exports);
18
18
  __exportStar(require("./forceWork"), exports);
19
19
  __exportStar(require("./pressingForce"), exports);
20
+ __exportStar(require("./calculateNormalOrFrictionForce"), exports);
21
+ __exportStar(require("./massWeight"), exports);
22
+ __exportStar(require("./gravitationalForcePlanets"), exports);
23
+ __exportStar(require("./gravitationalAttractionObjectHeight"), exports);
24
+ __exportStar(require("./electroStaticForce"), exports);
25
+ // export * from "./pressureDifferenceCalculation";
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ mass: number;
4
+ force: number;
5
+ target: "le poids" | "la masse";
6
+ };
7
+ export declare const MassWeightExercise: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=massWeight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"massWeight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/massWeight.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,GAAG,UAAU,CAAC;CACjC,CAAC;AAmEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MassWeightExercise = void 0;
4
+ const frenchify_1 = require("../../../math/utils/latex/frenchify");
5
+ const exercise_1 = require("../../../exercises/exercise");
6
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
7
+ const round_1 = require("../../../math/utils/round");
8
+ const randint_1 = require("../../../math/utils/random/randint");
9
+ const coinFlip_1 = require("../../../utils/coinFlip");
10
+ const g = 9.81;
11
+ const getMassWeightQuestion = () => {
12
+ const mass = (0, round_1.round)((0, randint_1.randint)(1, 1000), 2);
13
+ const force = (0, round_1.round)(mass * g, 2);
14
+ const target = (0, coinFlip_1.coinFlip)() ? "le poids" : "la masse";
15
+ const instruction = `Un système qui pèse $${mass}\\ kg$ subit une force de $${(0, frenchify_1.frenchify)(force)}\\ N$ due à la gravité. Quel est ${target} de ce système ?`;
16
+ const answer = target === "le poids"
17
+ ? `${force.toTree().toTex()}`
18
+ : `${mass.toTree().toTex()}`;
19
+ const hint = target === "le poids"
20
+ ? `Le poids est la force de gravité qui agit sur un objet. La formule est $P = m \\times g$, où $P$ est le poids en newtons (N), $m$ est la masse en kilogrammes (kg) et $g$ est l'accélération due à la gravité (environ $9.81\\ m/s^2$).`
21
+ : `La masse est la quantité de matière dans un objet. La formule pour la trouver à partir du poids est $m = \\frac{P}{g}$, où $m$ est la masse en kilogrammes (kg), $P$ est le poids en newtons (N) et $g$ est l'accélération due à la gravité (environ $9.81\\ m/s^2$).`;
22
+ const correction = target === "le poids"
23
+ ? `Le poids est la force exercée par la gravité sur un objet. Donc ici, le poids est $${force
24
+ .toTree()
25
+ .toTex()}\\ N$.`
26
+ : `La masse est la quantité de matière dans un objet. Donc ici, la masse est $${mass
27
+ .toTree()
28
+ .toTex()}\\ kg$.`;
29
+ const question = {
30
+ answer,
31
+ instruction,
32
+ hint,
33
+ correction,
34
+ keys: [],
35
+ answerFormat: "tex",
36
+ identifiers: {
37
+ mass,
38
+ force,
39
+ target,
40
+ },
41
+ };
42
+ return question;
43
+ };
44
+ const getPropositions = (n, { answer, mass, force, target }) => {
45
+ const propositions = [];
46
+ (0, exercise_1.addValidProp)(propositions, answer, "tex");
47
+ (0, exercise_1.tryToAddWrongProp)(propositions, mass.toTree().toTex());
48
+ (0, exercise_1.tryToAddWrongProp)(propositions, force.toTree().toTex());
49
+ (0, exercise_1.tryToAddWrongProp)(propositions, "Aucun des deux", "raw");
50
+ return (0, exercise_1.shuffleProps)(propositions, n);
51
+ };
52
+ const isAnswerValid = (ans, { answer }) => {
53
+ return ans === answer;
54
+ };
55
+ exports.MassWeightExercise = {
56
+ id: "massWeight",
57
+ label: "Calculer le poids ou la masse d'un système",
58
+ levels: ["2nde"],
59
+ isSingleStep: true,
60
+ sections: ["Forces"],
61
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMassWeightQuestion, nb),
62
+ qcmTimer: 60,
63
+ freeTimer: 60,
64
+ getPropositions,
65
+ isAnswerValid,
66
+ subject: "Physique",
67
+ hasHintAndCorrection: true,
68
+ };
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=pressureDifferenceCalculation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pressureDifferenceCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/forces/pressureDifferenceCalculation.ts"],"names":[],"mappings":""}
@@ -0,0 +1,106 @@
1
+ "use strict";
2
+ // import { frenchify } from "../../../math/utils/latex/frenchify";
3
+ // import {
4
+ // Exercise,
5
+ // Proposition,
6
+ // QCMGenerator,
7
+ // Question,
8
+ // QuestionGenerator,
9
+ // VEA,
10
+ // addValidProp,
11
+ // shuffleProps,
12
+ // tryToAddWrongProp,
13
+ // } from "../../../exercises/exercise";
14
+ // import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions";
15
+ // import { randint } from "../../../math/utils/random/randint";
16
+ // import { round, roundSignificant } from "../../../math/utils/round";
17
+ // import { random } from "../../../utils/random";
18
+ // const g = 9.81; // Accélération due à la gravité en m·s⁻²
19
+ // type Identifiers = {
20
+ // density: number; // Densité du fluide en kg·m⁻³
21
+ // depth1: number; // Profondeur 1 en m
22
+ // depth2: number; // Profondeur 2 en m
23
+ // };
24
+ // const getPressureDifferenceQuestion: QuestionGenerator<Identifiers> = () => {
25
+ // const density = round(randint(900, 1100), 3); // Densité de l'eau ou un fluide similaire
26
+ // const depth1 = randint(0, 50); // Profondeur en mètres
27
+ // const depth2 = randint(depth1 + 1, 100); // Profondeur plus profonde
28
+ // const deltaDepth = depth2 - depth1; // Différence de profondeur en m
29
+ // const pressureDifference = round(density * g * deltaDepth, 2); // Différence de pression en Pa
30
+ // const questionText = `Dans un fluide incompressible de densité $\\rho = ${frenchify(
31
+ // density,
32
+ // )}\\ \\text{kg·m}^{-3}$, déterminez la différence de pression $\\Delta P$ entre deux positions verticales de profondeur $z_1 = ${frenchify(
33
+ // depth1,
34
+ // )}\\ \\text{m}$ et $z_2 = ${frenchify(depth2)}\\ \\text{m}$.`;
35
+ // const hint = `La différence de pression entre deux positions dans un fluide incompressible est donnée par la relation :
36
+ // $$
37
+ // \\Delta P = \\rho \\times g \\times (z_2 - z_1)
38
+ // $$
39
+ // où $\\rho$ est la densité du fluide en $\\text{kg·m}^{-3}$, $g$ est l'accélération due à la gravité en $\\text{m·s}^{-2}$, et $z_2 - z_1$ est la différence de profondeur en $\\text{m}$.`;
40
+ // const correction = `La différence de pression est calculée comme suit :
41
+ // $$
42
+ // \\Delta P = \\rho \\times g \\times (z_2 - z_1)
43
+ // $$
44
+ // En remplaçant par les valeurs fournies :
45
+ // $$
46
+ // \\Delta P = ${frenchify(density)} \\times ${frenchify(
47
+ // g,
48
+ // )} \\times (${frenchify(depth2)} - ${frenchify(depth1)}) = ${frenchify(
49
+ // pressureDifference,
50
+ // )}\\ \\text{Pa}
51
+ // $$`;
52
+ // const question: Question<Identifiers> = {
53
+ // answer: pressureDifference.toTree().toTex(),
54
+ // instruction: questionText,
55
+ // hint,
56
+ // correction,
57
+ // keys: [],
58
+ // answerFormat: "tex",
59
+ // identifiers: {
60
+ // density,
61
+ // depth1,
62
+ // depth2,
63
+ // },
64
+ // };
65
+ // return question;
66
+ // };
67
+ // const getPropositions: QCMGenerator<Identifiers> = (
68
+ // n,
69
+ // { answer, density, depth1, depth2 },
70
+ // ) => {
71
+ // const propositions: Proposition[] = [];
72
+ // addValidProp(propositions, answer);
73
+ // const wrongAnswers = [
74
+ // roundSignificant(density * g * (depth1 + depth2), 2),
75
+ // roundSignificant(density * g * (depth2 - depth1) * 0.5, 2),
76
+ // roundSignificant(density * g * (depth2 + depth1), 2),
77
+ // roundSignificant(density * g * (depth2 - depth1 + 1), 2),
78
+ // ];
79
+ // wrongAnswers.forEach((wrongAnswer) => {
80
+ // tryToAddWrongProp(propositions, wrongAnswer);
81
+ // });
82
+ // while (propositions.length < n) {
83
+ // tryToAddWrongProp(
84
+ // propositions,
85
+ // round(randint(1000, 100000), 2).toTree().toTex(),
86
+ // );
87
+ // }
88
+ // return shuffleProps(propositions, n);
89
+ // };
90
+ // const isAnswerValid: VEA<Identifiers> = (ans, { answer }) => {
91
+ // return ans === answer;
92
+ // };
93
+ // export const pressureDifferenceCalculation: Exercise<Identifiers> = {
94
+ // id: "pressureDifferenceCalculation",
95
+ // label: "Calculer la différence de pression dans un fluide incompressible",
96
+ // levels: ["1reSpé"],
97
+ // isSingleStep: true,
98
+ // sections: ["Fluides"],
99
+ // generator: (nb: number) =>
100
+ // getDistinctQuestions(getPressureDifferenceQuestion, nb),
101
+ // qcmTimer: 60,
102
+ // freeTimer: 60,
103
+ // getPropositions,
104
+ // isAnswerValid,
105
+ // subject: "Physique",
106
+ // };
@@ -5,8 +5,8 @@ const exercise_1 = require("../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
6
6
  const randint_1 = require("../../math/utils/random/randint");
7
7
  const round_1 = require("../../math/utils/round");
8
- const atome_1 = require("../../pc/molecularChemistry/atome");
9
- const molecule_1 = require("../../pc/molecularChemistry/molecule");
8
+ const atome_1 = require("../../pc/constants/molecularChemistry/atome");
9
+ const molecule_1 = require("../../pc/constants/molecularChemistry/molecule");
10
10
  const shuffle_1 = require("../../utils/shuffle");
11
11
  const getFormulaFromComposition = () => {
12
12
  const moleculesWith2Atoms = molecule_1.molecules.filter((molecule) => molecule.atoms.length === 2 && molecule.state !== "aqueous");
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../exercises/exercise";
2
+ type Identifiers = {
3
+ atomicMass: number;
4
+ atomicNumber: number;
5
+ };
6
+ export declare const identifyAtomicMassOrAtomicNb: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=identifyAtomicMassOrAtomicNb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identifyAtomicMassOrAtomicNb.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/identifyAtomicMassOrAtomicNb.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AA0EF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.identifyAtomicMassOrAtomicNb = void 0;
4
+ const exercise_1 = require("../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
6
+ const randint_1 = require("../../math/utils/random/randint");
7
+ const round_1 = require("../../math/utils/round");
8
+ const coinFlip_1 = require("../../utils/coinFlip");
9
+ const random_1 = require("../../utils/random");
10
+ const requiresApostropheBefore_1 = require("../../utils/requiresApostropheBefore");
11
+ const getAtoms_1 = require("../utils/getAtoms");
12
+ const getIdentifyAtomicMassOrAtomicNbQuestion = () => {
13
+ const exo = generateExercise();
14
+ const question = {
15
+ answer: exo.answer,
16
+ instruction: `À l'aide du tableau périodique simplifié, déterminer ${exo.isAsking} d'un atome ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(exo.atom.name) ? "d'" : "de "}${exo.atom.name}![](https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/xpliveV2/activities/quizzes/generator/periodicTable2.png)`,
17
+ keys: [],
18
+ answerFormat: "tex",
19
+ identifiers: {
20
+ atomicMass: exo.atomicMasss,
21
+ atomicNumber: exo.atomicNumber,
22
+ },
23
+ };
24
+ return question;
25
+ };
26
+ const getPropositions = (n, { answer, atomicMass, atomicNumber }) => {
27
+ const propositions = [];
28
+ (0, exercise_1.addValidProp)(propositions, answer);
29
+ (0, exercise_1.tryToAddWrongProp)(propositions, +answer === atomicMass
30
+ ? atomicNumber.toTree().toTex()
31
+ : atomicMass.toTree().toTex());
32
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(atomicMass + atomicNumber, 2, false)
33
+ .toTree()
34
+ .toTex());
35
+ while (propositions.length < n) {
36
+ let random = (0, randint_1.randint)(+answer.replaceAll(",", ".") -
37
+ Math.min(+answer.replaceAll(",", "."), 5) -
38
+ 1, +answer.replaceAll(",", ".") + 5, [+answer.replaceAll(",", ".")]);
39
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(random, 2, false).toTree().toTex());
40
+ }
41
+ return (0, exercise_1.shuffleProps)(propositions, n);
42
+ };
43
+ const isAnswerValid = (ans, { answer }) => {
44
+ return ans === answer;
45
+ };
46
+ const generateExercise = () => {
47
+ const atoms = (0, getAtoms_1.getAtoms)(3);
48
+ const atom = (0, random_1.random)(atoms);
49
+ const isAsking = (0, coinFlip_1.coinFlip)() ? "la masse atomique" : "le numéro atomique";
50
+ return {
51
+ atom,
52
+ isAsking,
53
+ answer: isAsking == "la masse atomique"
54
+ ? atom.masseAtomique.toTree().toTex()
55
+ : atom.numeroAtomique.toTree().toTex(),
56
+ atomicMasss: atom.masseAtomique,
57
+ atomicNumber: atom.numeroAtomique,
58
+ };
59
+ };
60
+ exports.identifyAtomicMassOrAtomicNb = {
61
+ id: "identifyAtomicMassOrAtomicNb",
62
+ label: "Identifier la masse atomique et le numéro atomique",
63
+ levels: ["2nde"],
64
+ isSingleStep: true,
65
+ sections: ["Chimie organique"],
66
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getIdentifyAtomicMassOrAtomicNbQuestion, nb),
67
+ qcmTimer: 60,
68
+ freeTimer: 60,
69
+ getPropositions,
70
+ isAnswerValid,
71
+ subject: "Chimie",
72
+ };
@@ -21,9 +21,15 @@ export * from "./mole";
21
21
  export * from "./mecanicalWaves";
22
22
  export * from "./fluids";
23
23
  export * from "./electricity";
24
+ export * from "./energy";
25
+ export * from "./motion";
24
26
  export * from "./calibrationCurveOfSolution";
25
27
  export * from "./dosage";
26
28
  export * from "./spectral";
29
+ export * from "./identifyAtomicMassOrAtomicNb";
30
+ export * from "./recognizeRefractionOrReflectionAngles";
31
+ export * from "./orderOfMagnitude";
32
+ export * from "./power";
27
33
  /**exos pris des maths */
28
34
  export * from "../math/percent/findProportion";
29
35
  export * from "../math/calcul/proportionality/proportionalityTable";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,MAAM,CAAC;AACrB,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAE3B,yBAAyB;AACzB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qDAAqD,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,iDAAiD,CAAC;AAChE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mDAAmD,CAAC;AAClE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,MAAM,CAAC;AACrB,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AAExB,yBAAyB;AACzB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qDAAqD,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,cAAc,oCAAoC,CAAC;AACnD,cAAc,6CAA6C,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,8CAA8C,CAAC;AAClF,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,uDAAuD,CAAC;AACtE,cAAc,iDAAiD,CAAC;AAChE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,mDAAmD,CAAC;AAClE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kDAAkD,CAAC;AACjE,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC"}
@@ -38,9 +38,15 @@ __exportStar(require("./mole"), exports);
38
38
  __exportStar(require("./mecanicalWaves"), exports);
39
39
  __exportStar(require("./fluids"), exports);
40
40
  __exportStar(require("./electricity"), exports);
41
+ __exportStar(require("./energy"), exports);
42
+ __exportStar(require("./motion"), exports);
41
43
  __exportStar(require("./calibrationCurveOfSolution"), exports);
42
44
  __exportStar(require("./dosage"), exports);
43
45
  __exportStar(require("./spectral"), exports);
46
+ __exportStar(require("./identifyAtomicMassOrAtomicNb"), exports);
47
+ __exportStar(require("./recognizeRefractionOrReflectionAngles"), exports);
48
+ __exportStar(require("./orderOfMagnitude"), exports);
49
+ __exportStar(require("./power"), exports);
44
50
  /**exos pris des maths */
45
51
  __exportStar(require("../math/percent/findProportion"), exports);
46
52
  __exportStar(require("../math/calcul/proportionality/proportionalityTable"), exports);
@@ -5,8 +5,8 @@ const exercise_1 = require("../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
6
6
  const frenchify_1 = require("../../math/utils/latex/frenchify");
7
7
  const round_1 = require("../../math/utils/round");
8
- const atome_1 = require("../../pc/molecularChemistry/atome");
9
- const molecule_1 = require("../../pc/molecularChemistry/molecule");
8
+ const atome_1 = require("../../pc/constants/molecularChemistry/atome");
9
+ const molecule_1 = require("../../pc/constants/molecularChemistry/molecule");
10
10
  const shuffle_1 = require("../../utils/shuffle");
11
11
  const getMolarQuantityQuestion = () => {
12
12
  const mG = (0, round_1.round)(Math.random() * 150 + 50, 0); // Masse de l'échantillon en g (entre 50 et 200 g)
@@ -1,4 +1,6 @@
1
1
  export * from "./molarMass";
2
2
  export * from "./molFromMolarMass";
3
3
  export * from "./molFromMass";
4
+ export * from "./moleculeCountFromMol";
5
+ export * from "./moleculeCountFromMassAndAvogadro";
4
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,oCAAoC,CAAC"}
@@ -18,3 +18,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  __exportStar(require("./molarMass"), exports);
19
19
  __exportStar(require("./molFromMolarMass"), exports);
20
20
  __exportStar(require("./molFromMass"), exports);
21
+ __exportStar(require("./moleculeCountFromMol"), exports);
22
+ __exportStar(require("./moleculeCountFromMassAndAvogadro"), exports);
@@ -5,7 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
5
5
  const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
6
  const randfloat_1 = require("../../../math/utils/random/randfloat");
7
7
  const round_1 = require("../../../math/utils/round");
8
- const molecule_1 = require("../../../pc/molecularChemistry/molecule");
8
+ const molecule_1 = require("../../../pc/constants/molecularChemistry/molecule");
9
9
  const random_1 = require("../../../utils/random");
10
10
  const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
11
11
  const getMolarMassQuestion = () => {
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ moleculeName: string;
4
+ sampleMass: number;
5
+ molarMass: number;
6
+ };
7
+ export declare const MoleculeCountFromMassAndAvogadro: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=moleculeCountFromMassAndAvogadro.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moleculeCountFromMassAndAvogadro.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/moleculeCountFromMassAndAvogadro.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAiFF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAalE,CAAC"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MoleculeCountFromMassAndAvogadro = void 0;
4
+ const frenchify_1 = require("../../../math/utils/latex/frenchify");
5
+ const exercise_1 = require("../../../exercises/exercise");
6
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
7
+ const randfloat_1 = require("../../../math/utils/random/randfloat");
8
+ const molecule_1 = require("../../../pc/constants/molecularChemistry/molecule");
9
+ const random_1 = require("../../../utils/random");
10
+ const randint_1 = require("../../../math/utils/random/randint");
11
+ const atoms_1 = require("../../../pc/constants/molecularChemistry/atoms");
12
+ const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
13
+ const getMoleculeCountFromMassAndAvogadroQuestion = () => {
14
+ const molecule = (0, random_1.random)(molecule_1.molecules);
15
+ const sampleMass = (0, randfloat_1.randfloat)(0.1, 2, 2); // Sample mass in grams
16
+ const molarMass = molecule.weight; // Molar mass in g/mol
17
+ const Na = atoms_1.avogadroConstant.value.toSignificant(2);
18
+ const entitiesNumber = Na.times(sampleMass / molarMass).toSignificant(2);
19
+ const instruction = `Un échantillon a une masse $m = ${(0, frenchify_1.frenchify)(sampleMass)}\\ g$ de ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(molecule.name) ? "d'" : "de "}${molecule.name}. La masse molaire ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(molecule.name) ? "d'" : "de "}${molecule.name} est de $${molarMass}\\ g/mol$.
20
+ Déterminer le nombre de molécules ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(molecule.name) ? "d'" : "de "}${molecule.name}.`;
21
+ const question = {
22
+ answer: entitiesNumber.toTex(),
23
+ instruction,
24
+ keys: ["mol", "timesTenPower"],
25
+ answerFormat: "tex",
26
+ identifiers: { moleculeName: molecule.name, sampleMass, molarMass },
27
+ };
28
+ return question;
29
+ };
30
+ const getPropositions = (n, { answer, moleculeName, sampleMass }) => {
31
+ const propositions = [];
32
+ (0, exercise_1.addValidProp)(propositions, answer);
33
+ const Na = atoms_1.avogadroConstant.value.toSignificant(2);
34
+ const molecule = molecule_1.molecules.find((m) => m.name === moleculeName);
35
+ const molarMass = molecule.weight;
36
+ const wrongDivision = Na.times(molarMass / sampleMass).toSignificant(2);
37
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongDivision.toTex());
38
+ const wrongCalculation = Na.times(sampleMass * molarMass).toSignificant(2);
39
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongCalculation.toTex());
40
+ while (propositions.length < n) {
41
+ const wrongPower = Na.times((sampleMass / molarMass) * Math.pow(10, (0, randint_1.randint)(-2, 2, [0]))).toSignificant(2);
42
+ (0, exercise_1.tryToAddWrongProp)(propositions, wrongPower.toTex());
43
+ }
44
+ return (0, exercise_1.shuffleProps)(propositions, n);
45
+ };
46
+ const isAnswerValid = (ans, { answer, sampleMass, molarMass }) => {
47
+ let latexs = [];
48
+ const Na = atoms_1.avogadroConstant.value.toSignificant(2);
49
+ const validanswer1 = Na.times(sampleMass / molarMass)
50
+ .toSignificant(1)
51
+ .toTex();
52
+ const validanswer2 = Na.times(sampleMass / molarMass)
53
+ .toSignificant(2)
54
+ .toTex();
55
+ const validanswer3 = Na.times(sampleMass / molarMass)
56
+ .toSignificant(3)
57
+ .toTex();
58
+ latexs.push(validanswer1);
59
+ latexs.push(validanswer2);
60
+ latexs.push(validanswer3);
61
+ return latexs.includes(ans);
62
+ };
63
+ exports.MoleculeCountFromMassAndAvogadro = {
64
+ id: "moleculeCountFromMassAndAvogadro",
65
+ label: "Déterminer le nombre de molécules dans un échantillon",
66
+ levels: ["2nde", "1reSpé"],
67
+ isSingleStep: true,
68
+ sections: ["Chimie organique"],
69
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMoleculeCountFromMassAndAvogadroQuestion, nb),
70
+ qcmTimer: 60,
71
+ freeTimer: 60,
72
+ getPropositions,
73
+ isAnswerValid,
74
+ subject: "Chimie",
75
+ };