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.
- package/lib/exercises/exercise.d.ts +2 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/digitDecimalRank.js +4 -4
- package/lib/exercises/math/calcul/digitRank.js +4 -4
- package/lib/exercises/math/calcul/digitRankNumber.d.ts +8 -0
- package/lib/exercises/math/calcul/digitRankNumber.d.ts.map +1 -0
- package/lib/exercises/math/calcul/digitRankNumber.js +57 -0
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +34 -0
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +17 -0
- package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsDivision.js +23 -0
- package/lib/exercises/math/calcul/fractions/fractionsProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsProduct.js +15 -0
- package/lib/exercises/math/calcul/index.d.ts +1 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +1 -0
- package/lib/exercises/math/calcul/proportionality/index.d.ts +2 -0
- package/lib/exercises/math/calcul/proportionality/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/index.js +2 -0
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts +9 -0
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.d.ts.map +1 -0
- package/lib/exercises/math/calcul/proportionality/scaleCalculation.js +90 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts +9 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.d.ts.map +1 -0
- package/lib/exercises/math/calcul/proportionality/scaleUsage.js +95 -0
- package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.js +18 -0
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/allIdentities.js +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts +7 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +60 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +31 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts +9 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +86 -0
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +21 -2
- package/lib/exercises/math/calculLitteral/distributivity/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/distributivity/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/index.js +2 -0
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +23 -2
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +17 -2
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +21 -2
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +26 -1
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +18 -2
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +19 -2
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +15 -2
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +20 -5
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +24 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +20 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +19 -3
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +24 -8
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +21 -2
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +24 -4
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +25 -5
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +19 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +77 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts +8 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +80 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +2 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +2 -0
- package/lib/exercises/math/conversion/lengthConversion.d.ts.map +1 -1
- package/lib/exercises/math/conversion/lengthConversion.js +18 -4
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.js +1 -0
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts +10 -0
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.d.ts.map +1 -0
- package/lib/exercises/math/functions/affines/affineExpressionFromTwoImages.js +81 -0
- package/lib/exercises/math/functions/affines/index.d.ts +1 -0
- package/lib/exercises/math/functions/affines/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/index.js +1 -0
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +12 -2
- package/lib/exercises/math/functions/trinoms/index.d.ts +2 -0
- package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/index.js +2 -0
- package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts +5 -0
- package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/solveEquationByFactorisation.js +44 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts +9 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationByFactorisation.js +134 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts +7 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/solveSecondDegreeEquationFromCano.js +59 -0
- package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/scalarProductViaCoords.js +1 -0
- package/lib/exercises/math/index.d.ts +1 -0
- package/lib/exercises/math/index.d.ts.map +1 -1
- package/lib/exercises/math/index.js +1 -0
- package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/applyPercent.js +20 -2
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts +11 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindRandomTermFromTwoTerms.js +49 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +1 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +1 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts +2 -0
- package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/index.js +17 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts +4 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/index.js +19 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts +5 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +52 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts +5 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorLinearCombinationCoords.js +62 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts +9 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -0
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +54 -0
- package/lib/exercises/math/squareRoots/squareRootIdentities.js +3 -3
- package/lib/exercises/math/suites/sequencePlot.d.ts.map +1 -1
- package/lib/exercises/math/suites/sequencePlot.js +1 -2
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +1 -0
- package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +3 -3
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.js +29 -4
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +6 -6
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +2 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalElements/index.d.ts +1 -0
- package/lib/exercises/pc/chemicalElements/index.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/index.js +1 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts +11 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +100 -0
- package/lib/exercises/pc/chemicalEquations.d.ts +1 -1
- package/lib/exercises/pc/chemicalEquations.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalEquations.js +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +1 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts +2 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/index.js +2 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts +5 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +69 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts +11 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +181 -0
- package/lib/exercises/pc/chemicalReactionsProduct.d.ts +1 -1
- package/lib/exercises/pc/chemicalReactionsProduct.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactionsProduct.js +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +2 -1
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts +10 -0
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/dosage/concentrationCalculation.js +119 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts +10 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +117 -0
- package/lib/exercises/pc/dosage/index.d.ts +2 -0
- package/lib/exercises/pc/dosage/index.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/index.js +2 -0
- package/lib/exercises/pc/electricity/calculateIntensity.d.ts +8 -0
- package/lib/exercises/pc/electricity/calculateIntensity.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateIntensity.js +60 -0
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.d.ts +10 -0
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +105 -0
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts +11 -0
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/calculateVoltage.js +144 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts +9 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +81 -0
- package/lib/exercises/pc/electricity/index.d.ts +7 -0
- package/lib/exercises/pc/electricity/index.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/index.js +7 -0
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.d.ts +10 -0
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +110 -0
- package/lib/exercises/pc/electricity/ohmLaw.d.ts +11 -0
- package/lib/exercises/pc/electricity/ohmLaw.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/ohmLaw.js +123 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts +5 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +95 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts +8 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -0
- package/lib/exercises/pc/energy/calorificValue.js +78 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts +8 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.js +78 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts +11 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.js +141 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts +8 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.js +84 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts +10 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.js +122 -0
- package/lib/exercises/pc/energy/energyTransfer.d.ts +10 -0
- package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -0
- package/lib/exercises/pc/energy/energyTransfer.js +67 -0
- package/lib/exercises/pc/energy/index.d.ts +9 -0
- package/lib/exercises/pc/energy/index.d.ts.map +1 -0
- package/lib/exercises/pc/energy/index.js +24 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts +10 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +168 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts +11 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +143 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts +8 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +102 -0
- package/lib/exercises/pc/forces/electroStaticForce.d.ts +13 -0
- package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -0
- package/lib/exercises/pc/forces/electroStaticForce.js +117 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts +9 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +132 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts +1 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionValue.js +31 -27
- package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts +10 -0
- package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts.map +1 -0
- package/lib/exercises/pc/forces/gravitationalForcePlanets.js +118 -0
- package/lib/exercises/pc/forces/index.d.ts +5 -0
- package/lib/exercises/pc/forces/index.d.ts.map +1 -1
- package/lib/exercises/pc/forces/index.js +6 -0
- package/lib/exercises/pc/forces/massWeight.d.ts +9 -0
- package/lib/exercises/pc/forces/massWeight.d.ts.map +1 -0
- package/lib/exercises/pc/forces/massWeight.js +68 -0
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.d.ts +1 -0
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/forces/pressureDifferenceCalculation.js +106 -0
- package/lib/exercises/pc/formulaFromComposition.js +2 -2
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts +8 -0
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts.map +1 -0
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +72 -0
- package/lib/exercises/pc/index.d.ts +6 -0
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +6 -0
- package/lib/exercises/pc/molarQuantity.js +2 -2
- package/lib/exercises/pc/mole/index.d.ts +2 -0
- package/lib/exercises/pc/mole/index.d.ts.map +1 -1
- package/lib/exercises/pc/mole/index.js +2 -0
- package/lib/exercises/pc/mole/molarMass.js +1 -1
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.d.ts +9 -0
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.d.ts.map +1 -0
- package/lib/exercises/pc/mole/moleculeCountFromMassAndAvogadro.js +75 -0
- package/lib/exercises/pc/mole/moleculeCountFromMol.d.ts +7 -0
- package/lib/exercises/pc/mole/moleculeCountFromMol.d.ts.map +1 -0
- package/lib/exercises/pc/mole/moleculeCountFromMol.js +66 -0
- package/lib/exercises/pc/moleculeFormula.js +1 -1
- package/lib/exercises/pc/moleculeNomenclature.js +1 -1
- package/lib/exercises/pc/motion/averageSpeed.d.ts +12 -0
- package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -0
- package/lib/exercises/pc/motion/averageSpeed.js +122 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts +10 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.js +146 -0
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts +7 -0
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.d.ts.map +1 -0
- package/lib/exercises/pc/motion/characteristicsOfVelocityVector.js +86 -0
- package/lib/exercises/pc/motion/index.d.ts +7 -0
- package/lib/exercises/pc/motion/index.d.ts.map +1 -0
- package/lib/exercises/pc/motion/index.js +22 -0
- package/lib/exercises/pc/motion/motionReference.d.ts +9 -0
- package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -0
- package/lib/exercises/pc/motion/motionReference.js +168 -0
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts +5 -0
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -0
- package/lib/exercises/pc/motion/typeOfAcceleration.js +97 -0
- package/lib/exercises/pc/motion/typeOfMovement.d.ts +5 -0
- package/lib/exercises/pc/motion/typeOfMovement.d.ts.map +1 -0
- package/lib/exercises/pc/motion/typeOfMovement.js +111 -0
- package/lib/exercises/pc/orderOfMagnitude.d.ts +8 -0
- package/lib/exercises/pc/orderOfMagnitude.d.ts.map +1 -0
- package/lib/exercises/pc/orderOfMagnitude.js +68 -0
- package/lib/exercises/pc/pH.d.ts.map +1 -1
- package/lib/exercises/pc/pH.js +1 -0
- package/lib/exercises/pc/potentialEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/potentialEnergy.js +17 -5
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts +8 -0
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts.map +1 -0
- package/lib/exercises/pc/power/calculatePowerOfLight.js +86 -0
- package/lib/exercises/pc/power/index.d.ts +2 -0
- package/lib/exercises/pc/power/index.d.ts.map +1 -0
- package/lib/exercises/pc/power/index.js +17 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts +5 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -0
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +117 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts +9 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.d.ts.map +1 -0
- package/lib/exercises/pc/sound/findPeriodOrFrequencyFromGraph.js +95 -0
- package/lib/exercises/pc/sound/index.d.ts +1 -0
- package/lib/exercises/pc/sound/index.d.ts.map +1 -1
- package/lib/exercises/pc/sound/index.js +1 -0
- package/lib/exercises/pc/spectral/spectralEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/spectral/spectralEnergy.js +1 -0
- package/lib/exercises/pc/waves/index.d.ts +1 -0
- package/lib/exercises/pc/waves/index.d.ts.map +1 -1
- package/lib/exercises/pc/waves/index.js +1 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.d.ts +10 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.d.ts.map +1 -0
- package/lib/exercises/pc/waves/lightDistanceConversion.js +161 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -1
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +1 -0
- package/lib/exercises/pc/weight/calculateWeight.d.ts +7 -0
- package/lib/exercises/pc/weight/calculateWeight.d.ts.map +1 -0
- package/lib/exercises/pc/weight/calculateWeight.js +73 -0
- package/lib/exercises/pc/weight/index.d.ts +1 -0
- package/lib/exercises/pc/weight/index.d.ts.map +1 -1
- package/lib/exercises/pc/weight/index.js +1 -0
- package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
- package/lib/exercises/pc/weight/weightOnTheMoon.js +7 -6
- package/lib/exercises/utils/getAtoms.d.ts +1 -1
- package/lib/exercises/utils/getAtoms.d.ts.map +1 -1
- package/lib/exercises/utils/getAtoms.js +1 -1
- package/lib/index.d.ts +216 -75
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -0
- package/lib/math/geometry/spacePoint.d.ts +27 -0
- package/lib/math/geometry/spacePoint.d.ts.map +1 -0
- package/lib/math/geometry/spacePoint.js +80 -0
- package/lib/math/geometry/spaceVector.d.ts +28 -0
- package/lib/math/geometry/spaceVector.d.ts.map +1 -0
- package/lib/math/geometry/spaceVector.js +83 -0
- package/lib/math/numbers/decimals/decimal.d.ts +1 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +8 -0
- package/lib/math/numbers/rationals/rational.d.ts +1 -0
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.js +4 -0
- package/lib/math/numbers/reals/extendedRingElement.d.ts +1 -2
- package/lib/math/numbers/reals/extendedRingElement.d.ts.map +1 -1
- package/lib/math/polynomials/affine.d.ts +4 -0
- package/lib/math/polynomials/affine.d.ts.map +1 -1
- package/lib/math/polynomials/affine.js +10 -0
- package/lib/math/polynomials/trinom.d.ts +2 -1
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +3 -0
- package/lib/pc/constants/atoms.d.ts +0 -1
- package/lib/pc/constants/atoms.d.ts.map +1 -1
- package/lib/pc/constants/atoms.js +2 -2
- package/lib/pc/constants/coulomb.d.ts +3 -0
- package/lib/pc/constants/coulomb.d.ts.map +1 -0
- package/lib/pc/constants/coulomb.js +13 -0
- package/lib/pc/constants/earth.d.ts +0 -1
- package/lib/pc/constants/earth.d.ts.map +1 -1
- package/lib/pc/constants/earth.js +4 -4
- package/lib/pc/constants/gravity.d.ts +1 -1
- package/lib/pc/constants/gravity.d.ts.map +1 -1
- package/lib/pc/constants/gravity.js +16 -7
- package/lib/pc/constants/mechanics/gravitational.d.ts +14 -0
- package/lib/pc/constants/mechanics/gravitational.d.ts.map +1 -0
- package/lib/pc/constants/mechanics/gravitational.js +37 -0
- package/lib/pc/constants/mechanics/planets.d.ts +15 -0
- package/lib/pc/constants/mechanics/planets.d.ts.map +1 -0
- package/lib/pc/constants/mechanics/planets.js +35 -0
- package/lib/pc/constants/mechanics/waves.d.ts +8 -0
- package/lib/pc/constants/mechanics/waves.d.ts.map +1 -0
- package/lib/pc/constants/mechanics/waves.js +8 -0
- package/lib/pc/constants/molecularChemistry/atomSymbols.d.ts +2 -0
- package/lib/pc/constants/molecularChemistry/atomSymbols.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/atomSymbols.js +2 -0
- package/lib/pc/constants/molecularChemistry/atome.d.ts +18 -0
- package/lib/pc/constants/molecularChemistry/atome.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/atome.js +174 -0
- package/lib/pc/constants/molecularChemistry/atoms.d.ts +9 -0
- package/lib/pc/constants/molecularChemistry/atoms.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/atoms.js +15 -0
- package/lib/pc/constants/molecularChemistry/molecule.d.ts +25 -0
- package/lib/pc/constants/molecularChemistry/molecule.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/molecule.js +579 -0
- package/lib/pc/constants/molecularChemistry/reaction.d.ts +27 -0
- package/lib/pc/constants/molecularChemistry/reaction.d.ts.map +1 -0
- package/lib/pc/constants/molecularChemistry/reaction.js +471 -0
- package/lib/pc/measure/measure.d.ts +16 -6
- package/lib/pc/measure/measure.d.ts.map +1 -1
- package/lib/pc/measure/measure.js +112 -16
- package/lib/pc/units/AmountOfSubstance.d.ts +17 -0
- package/lib/pc/units/AmountOfSubstance.d.ts.map +1 -0
- package/lib/pc/units/AmountOfSubstance.js +40 -0
- package/lib/pc/units/PressionUnit.d.ts +17 -0
- package/lib/pc/units/PressionUnit.d.ts.map +1 -0
- package/lib/pc/units/PressionUnit.js +32 -0
- package/lib/pc/units/distanceUnits.d.ts +16 -0
- package/lib/pc/units/distanceUnits.d.ts.map +1 -0
- package/lib/pc/units/distanceUnits.js +32 -0
- package/lib/pc/units/divideUnit.d.ts +13 -0
- package/lib/pc/units/divideUnit.d.ts.map +1 -0
- package/lib/pc/units/divideUnit.js +32 -0
- package/lib/pc/units/electricalChargeUnit.d.ts +17 -0
- package/lib/pc/units/electricalChargeUnit.d.ts.map +1 -0
- package/lib/pc/units/electricalChargeUnit.js +40 -0
- package/lib/pc/units/electricalResistanceUnit.d.ts +18 -0
- package/lib/pc/units/electricalResistanceUnit.d.ts.map +1 -0
- package/lib/pc/units/electricalResistanceUnit.js +32 -0
- package/lib/pc/units/electricalUnit.d.ts +18 -0
- package/lib/pc/units/electricalUnit.d.ts.map +1 -0
- package/lib/pc/units/electricalUnit.js +32 -0
- package/lib/pc/units/energyUnit.d.ts +16 -0
- package/lib/pc/units/energyUnit.d.ts.map +1 -0
- package/lib/pc/units/energyUnit.js +32 -0
- package/lib/pc/units/forceUnits.d.ts +16 -0
- package/lib/pc/units/forceUnits.d.ts.map +1 -0
- package/lib/pc/units/forceUnits.js +32 -0
- package/lib/pc/units/frequenceUnit.d.ts +17 -0
- package/lib/pc/units/frequenceUnit.d.ts.map +1 -0
- package/lib/pc/units/frequenceUnit.js +40 -0
- package/lib/pc/units/interfaces/baseTenUnit.d.ts +10 -0
- package/lib/pc/units/interfaces/baseTenUnit.d.ts.map +1 -0
- package/lib/pc/units/interfaces/baseTenUnit.js +16 -0
- package/lib/pc/units/interfaces/basicUnit.d.ts +13 -0
- package/lib/pc/units/interfaces/basicUnit.d.ts.map +1 -0
- package/lib/pc/units/interfaces/basicUnit.js +19 -0
- package/lib/pc/units/interfaces/unit.d.ts +13 -0
- package/lib/pc/units/interfaces/unit.d.ts.map +1 -0
- package/lib/pc/units/interfaces/unit.js +2 -0
- package/lib/pc/units/massUnits.d.ts +17 -0
- package/lib/pc/units/massUnits.d.ts.map +1 -0
- package/lib/pc/units/massUnits.js +32 -0
- package/lib/pc/units/mulitplyUnits.d.ts +13 -0
- package/lib/pc/units/mulitplyUnits.d.ts.map +1 -0
- package/lib/pc/units/mulitplyUnits.js +26 -0
- package/lib/pc/units/powerUnits.d.ts +14 -0
- package/lib/pc/units/powerUnits.d.ts.map +1 -0
- package/lib/pc/units/powerUnits.js +26 -0
- package/lib/pc/units/timeUnits.d.ts +13 -0
- package/lib/pc/units/timeUnits.d.ts.map +1 -0
- package/lib/pc/units/timeUnits.js +42 -0
- package/lib/pc/units/volumeUnit.d.ts +17 -0
- package/lib/pc/units/volumeUnit.d.ts.map +1 -0
- package/lib/pc/units/volumeUnit.js +32 -0
- package/lib/pc/units/wattUnit.d.ts +17 -0
- package/lib/pc/units/wattUnit.d.ts.map +1 -0
- package/lib/pc/units/wattUnit.js +32 -0
- package/lib/playground.d.ts +2 -0
- package/lib/playground.d.ts.map +1 -0
- package/lib/playground.js +19 -0
- package/lib/server.d.ts +3 -0
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +11 -5
- package/lib/tree/nodes/equations/equationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/equations/equationSolutionNode.js +8 -0
- package/lib/tree/nodes/node.d.ts +4 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +2 -2
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +40 -12
- package/lib/tree/nodes/operators/powerNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/powerNode.js +12 -0
- package/lib/utils/alignTex.d.ts +2 -0
- package/lib/utils/alignTex.d.ts.map +1 -0
- package/lib/utils/alignTex.js +18 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC"}
|
|
@@ -18,3 +18,5 @@ __exportStar(require("./calculateSynthesisEfficiency"), exports);
|
|
|
18
18
|
__exportStar(require("./calculateCombustionEnergy"), exports);
|
|
19
19
|
__exportStar(require("./identifyLimitingReagent"), exports);
|
|
20
20
|
__exportStar(require("./identifyStoichiometricMixture"), exports);
|
|
21
|
+
__exportStar(require("./stoichiometricReaction"), exports);
|
|
22
|
+
__exportStar(require("./titrationEquivalenceRelation"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stoichiometricReaction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/stoichiometricReaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAyDtB,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stoichiometricReaction = 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 AmountOfSubstance_1 = require("../../../pc/units/AmountOfSubstance");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const getStoichiometricReactionQuestion = () => {
|
|
11
|
+
const exo = genearteExercise();
|
|
12
|
+
const question = {
|
|
13
|
+
answer: exo.answer,
|
|
14
|
+
instruction: exo.instruction,
|
|
15
|
+
keys: [],
|
|
16
|
+
answerFormat: "raw",
|
|
17
|
+
identifiers: {},
|
|
18
|
+
};
|
|
19
|
+
return question;
|
|
20
|
+
};
|
|
21
|
+
const getPropositions = (n, { answer }) => {
|
|
22
|
+
const propositions = [];
|
|
23
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
24
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Oui.", "raw");
|
|
25
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Non.", "raw");
|
|
26
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir.", "raw");
|
|
27
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
28
|
+
};
|
|
29
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
30
|
+
return ans === answer;
|
|
31
|
+
};
|
|
32
|
+
const genearteExercise = () => {
|
|
33
|
+
const answer = (0, coinFlip_1.coinFlip)() ? "Oui." : "Non.";
|
|
34
|
+
const a = (0, randint_1.randint)(2, 9);
|
|
35
|
+
const b = (0, randint_1.randint)(2, 9);
|
|
36
|
+
const c = (0, randint_1.randint)(2, 9);
|
|
37
|
+
const d = (0, randint_1.randint)(2, 9);
|
|
38
|
+
const nA = answer === "Oui." ? a * (0, randint_1.randint)(2, 5) : a * (0, randint_1.randint)(2, 6);
|
|
39
|
+
const nB = answer === "Oui." ? b * (nA / a) : b * (0, randint_1.randint)(6, 11);
|
|
40
|
+
const nAMeasure = new measure_1.Measure(nA, 0, AmountOfSubstance_1.AmountOfSubstance.mol);
|
|
41
|
+
const nBMeasure = new measure_1.Measure(nB, 0, AmountOfSubstance_1.AmountOfSubstance.mol);
|
|
42
|
+
const nCMeasure = new measure_1.Measure((0, randint_1.randint)(2, 20), 0, AmountOfSubstance_1.AmountOfSubstance.mol);
|
|
43
|
+
const nDMeasure = new measure_1.Measure((0, randint_1.randint)(2, 20), 0, AmountOfSubstance_1.AmountOfSubstance.mol);
|
|
44
|
+
const instruction = `Soit la réaction chimique, $${a}A + ${b}B \\rightarrow ${c}C + ${d}D$. Déterminer si elle est stochiométrique, en sachant :
|
|
45
|
+
- $n(A) = ${nAMeasure.toTex({ notScientific: true })}$
|
|
46
|
+
- $n(B) = ${nBMeasure.toTex({ notScientific: true })}$
|
|
47
|
+
- $n(C) = ${nCMeasure.toTex({ notScientific: true })}$
|
|
48
|
+
- $n(D) = ${nDMeasure.toTex({ notScientific: true })}$`;
|
|
49
|
+
return {
|
|
50
|
+
instruction,
|
|
51
|
+
answer,
|
|
52
|
+
nA,
|
|
53
|
+
nB,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
exports.stoichiometricReaction = {
|
|
57
|
+
id: "stoichiometricReaction",
|
|
58
|
+
label: "Déterminer si une réaction est stochiométrique",
|
|
59
|
+
levels: ["1reSpé"],
|
|
60
|
+
isSingleStep: true,
|
|
61
|
+
sections: ["Réaction chimique"],
|
|
62
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getStoichiometricReactionQuestion, nb),
|
|
63
|
+
qcmTimer: 60,
|
|
64
|
+
freeTimer: 60,
|
|
65
|
+
getPropositions,
|
|
66
|
+
isAnswerValid,
|
|
67
|
+
answerType: "QCM",
|
|
68
|
+
subject: "Physique",
|
|
69
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
a: number;
|
|
4
|
+
b: number;
|
|
5
|
+
vA: number;
|
|
6
|
+
vB: number;
|
|
7
|
+
cB: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const titrationEquivalenceRelation: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=titrationEquivalenceRelation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"titrationEquivalenceRelation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/titrationEquivalenceRelation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAwMF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAgB9D,CAAC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.titrationEquivalenceRelation = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const frenchify_1 = require("../../../math/utils/latex/frenchify");
|
|
7
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const round_1 = require("../../../math/utils/round");
|
|
10
|
+
const measure_1 = require("../../../pc/measure/measure");
|
|
11
|
+
const AmountOfSubstance_1 = require("../../../pc/units/AmountOfSubstance");
|
|
12
|
+
const divideUnit_1 = require("../../../pc/units/divideUnit");
|
|
13
|
+
const volumeUnit_1 = require("../../../pc/units/volumeUnit");
|
|
14
|
+
const random_1 = require("../../../utils/random");
|
|
15
|
+
const titrationReactions = [
|
|
16
|
+
{
|
|
17
|
+
titré: { name: "de l'acide chlorhydrique", symbol: "HCl" },
|
|
18
|
+
titrant: { name: "de l'hydroxyde de sodium", symbol: "NaOH" },
|
|
19
|
+
produit: "NaCl + H₂O",
|
|
20
|
+
coeff: [1, 1],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
titré: { name: "de l'acide acétique", symbol: "CH₃COOH" },
|
|
24
|
+
titrant: { name: "de l'hydroxyde de sodium", symbol: "NaOH" },
|
|
25
|
+
produit: "CH₃COONa + H₂O",
|
|
26
|
+
coeff: [1, 1],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
titré: { name: "de l'acide sulfurique", symbol: "H₂SO₄" },
|
|
30
|
+
titrant: { name: "de l'hydroxyde de sodium", symbol: "NaOH" },
|
|
31
|
+
produit: "Na₂SO₄ + H₂O",
|
|
32
|
+
coeff: [1, 2],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
titré: { name: "de l'acide nitrique", symbol: "HNO₃" },
|
|
36
|
+
titrant: { name: "de l'hydroxyde de sodium", symbol: "NaOH" },
|
|
37
|
+
produit: "NaNO₃ + H₂O",
|
|
38
|
+
coeff: [1, 1],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
titré: { name: "de l'acide oxalique", symbol: "H₂C₂O₄" },
|
|
42
|
+
titrant: { name: "du permanganate de potassium", symbol: "KMnO₄" },
|
|
43
|
+
produit: "MnSO₄ + CO₂ + H₂O",
|
|
44
|
+
coeff: [5, 2],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
titré: { name: "du chlorure de sodium", symbol: "NaCl" },
|
|
48
|
+
titrant: { name: "du nitrate d'argent", symbol: "AgNO₃" },
|
|
49
|
+
produit: "AgCl + NaNO₃",
|
|
50
|
+
coeff: [1, 1],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
titré: { name: "de l'acide ascorbique", symbol: "C₆H₈O₆" },
|
|
54
|
+
titrant: { name: "de l'iode", symbol: "I₂" },
|
|
55
|
+
produit: "C₆H₆O₆ + HI",
|
|
56
|
+
coeff: [1, 1],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
titré: { name: "de l'hydroxyde de calcium", symbol: "Ca(OH)₂" },
|
|
60
|
+
titrant: { name: "de l'acide chlorhydrique", symbol: "HCl" },
|
|
61
|
+
produit: "CaCl₂ + H₂O",
|
|
62
|
+
coeff: [1, 2],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
titré: { name: "de l'acide phosphorique", symbol: "H₃PO₄" },
|
|
66
|
+
titrant: { name: "de l'hydroxyde de sodium", symbol: "NaOH" },
|
|
67
|
+
produit: "Na₃PO₄ + H₂O",
|
|
68
|
+
coeff: [1, 3],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
titré: { name: "de l'acide borique", symbol: "H₃BO₃" },
|
|
72
|
+
titrant: { name: "de l'hydroxyde de sodium", symbol: "NaOH" },
|
|
73
|
+
produit: "NaB(OH)₄",
|
|
74
|
+
coeff: [1, 1],
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
const getTitrationEquivalenceRelationQuestion = () => {
|
|
78
|
+
const exo = generateExo();
|
|
79
|
+
const question = {
|
|
80
|
+
answer: exo.answer.toTex(),
|
|
81
|
+
instruction: exo.instruction,
|
|
82
|
+
keys: [],
|
|
83
|
+
hint: exo.hint,
|
|
84
|
+
correction: exo.correction,
|
|
85
|
+
answerFormat: "tex",
|
|
86
|
+
identifiers: {
|
|
87
|
+
a: exo.a,
|
|
88
|
+
b: exo.b,
|
|
89
|
+
vA: exo.vA.getValueAsNumber(),
|
|
90
|
+
vB: exo.vB.getValueAsNumber(),
|
|
91
|
+
cB: exo.cB.getValueAsNumber(),
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
return question;
|
|
95
|
+
};
|
|
96
|
+
const getPropositions = (n, { answer, a, b, vA, vB, cB }) => {
|
|
97
|
+
const propositions = [];
|
|
98
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
99
|
+
const correctAns = (0, round_1.round)((b * vB * cB) / (a * vA), 2);
|
|
100
|
+
const unit = new divideUnit_1.DivideUnit(AmountOfSubstance_1.AmountOfSubstance.mol, volumeUnit_1.VolumeUnit.mL);
|
|
101
|
+
let random;
|
|
102
|
+
while (propositions.length < n) {
|
|
103
|
+
random = (0, randfloat_1.randfloat)(correctAns - 1, correctAns + 2, 2, [correctAns]);
|
|
104
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new measure_1.Measure(Math.abs(random), 0, unit).toTex());
|
|
105
|
+
}
|
|
106
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
107
|
+
};
|
|
108
|
+
const isAnswerValid = (ans, { answer, a, b, vA, vB, cB }) => {
|
|
109
|
+
const correctAns = (0, round_1.round)((b * vB * cB) / (a * vA), 2);
|
|
110
|
+
const unit = new divideUnit_1.DivideUnit(AmountOfSubstance_1.AmountOfSubstance.mol, volumeUnit_1.VolumeUnit.mL);
|
|
111
|
+
return [
|
|
112
|
+
answer,
|
|
113
|
+
(0, frenchify_1.frenchify)(correctAns),
|
|
114
|
+
answer.replace(`\\ ${unit.toTex()}`, ""),
|
|
115
|
+
].includes(ans);
|
|
116
|
+
};
|
|
117
|
+
const generateExo = () => {
|
|
118
|
+
const reaction = (0, random_1.random)(titrationReactions);
|
|
119
|
+
const vA = new measure_1.Measure(5 * (0, randint_1.randint)(2, 11), 0, volumeUnit_1.VolumeUnit.mL);
|
|
120
|
+
const cB = new measure_1.Measure((0, random_1.random)([0.05, 0.1, 0.2, 0.25, 0.5, 0.75, 1.0]), 0, new divideUnit_1.DivideUnit(AmountOfSubstance_1.AmountOfSubstance.mol, volumeUnit_1.VolumeUnit.mL));
|
|
121
|
+
const vB = new measure_1.Measure(5 * (0, randint_1.randint)(1, 11), 0, volumeUnit_1.VolumeUnit.mL);
|
|
122
|
+
const reactionString = `${reaction.coeff[0] !== 1 ? reaction.coeff[0] : ""}${reaction.titré.symbol} + ${reaction.coeff[1] !== 1 ? reaction.coeff[1] : ""}${reaction.titrant.symbol} \\Rightarrow ${reaction.produit}`;
|
|
123
|
+
const hint = `Rappel : Au point d'équivalence, les quantités de matière ${reaction.titré.name} et ${reaction.titrant.name} sont égales , c'est-à-dire :
|
|
124
|
+
|
|
125
|
+
- $${reaction.coeff[0]} \\times n(${reaction.titré.symbol}) = ${reaction.coeff[1]} \\times n(${reaction.titrant.symbol})$`;
|
|
126
|
+
const instruction = `On réalise un titrage entre une solution ${reaction.titré.name}$(${reaction.titré.symbol})$ et une solution ${reaction.titrant.name}$(${reaction.titrant.symbol})$.
|
|
127
|
+
|
|
128
|
+
- On prélève un volume de $V_A=${vA.toTex({
|
|
129
|
+
notScientific: true,
|
|
130
|
+
})}$ de la solution ${reaction.titré.name} de concentration inconnue $C_A$
|
|
131
|
+
- On ajoute progressivement une solution ${reaction.titrant.name} de concentration connue $C_B=${cB.toTex({ notScientific: true })}$
|
|
132
|
+
- Le volume ${reaction.titrant.name} nécessaire pour atteindre le point d'équivalence est $V_B=${vB.toTex({
|
|
133
|
+
notScientific: true,
|
|
134
|
+
})}$
|
|
135
|
+
- Réaction : $${reactionString}$
|
|
136
|
+
|
|
137
|
+
Calculer la concentration $C_A$ de (${reaction.titré.name}), arrondie au centiéme.
|
|
138
|
+
`;
|
|
139
|
+
const answer = cB
|
|
140
|
+
.times(vB)
|
|
141
|
+
.times(reaction.coeff[1])
|
|
142
|
+
.divide(vA.times(reaction.coeff[0]))
|
|
143
|
+
.toSignificant(2);
|
|
144
|
+
const correction = `Utiliser la relation d'équivalence du titrage :
|
|
145
|
+
|
|
146
|
+
Au point d'équivalence, les quantités de matière ${reaction.titré.name} et ${reaction.titrant.name} sont égales , c'est-à-dire :
|
|
147
|
+
- $${reaction.coeff[0]} \\times n(${reaction.titré.symbol}) = ${reaction.coeff[1]} \\times n(${reaction.titrant.symbol})$
|
|
148
|
+
- Or, la quantité de matière est donnée par : $n=C \\times V$
|
|
149
|
+
- Donc à l'équivalence : $a \\times C_A \\times V_A =b \\times C_B \\times V_B$
|
|
150
|
+
- Ce qui donne : $C_A = \\frac{b \\times C_B \\times V_B}{a \\times V_A} \\Rightarrow C_A = \\frac{${reaction.coeff[1]} \\times ${cB.toTex({ notScientific: true })} \\times ${vB.toTex({
|
|
151
|
+
notScientific: true,
|
|
152
|
+
})}}{${reaction.coeff[0]} \\times ${vA.toTex({
|
|
153
|
+
notScientific: true,
|
|
154
|
+
})}} \\Rightarrow C_A = ${answer.toTex({ notScientific: true })}$`;
|
|
155
|
+
return {
|
|
156
|
+
instruction,
|
|
157
|
+
answer,
|
|
158
|
+
hint,
|
|
159
|
+
correction,
|
|
160
|
+
vA,
|
|
161
|
+
vB,
|
|
162
|
+
cB,
|
|
163
|
+
a: reaction.coeff[0],
|
|
164
|
+
b: reaction.coeff[1],
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
exports.titrationEquivalenceRelation = {
|
|
168
|
+
id: "titrationEquivalenceRelation",
|
|
169
|
+
label: "Calculer la concentration d'un element titré à l'aide d'une équation de réaction d'un mélange stœchiométrique.",
|
|
170
|
+
levels: ["1reSpé"],
|
|
171
|
+
isSingleStep: true,
|
|
172
|
+
sections: ["Réaction chimique"],
|
|
173
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTitrationEquivalenceRelationQuestion, nb, 10),
|
|
174
|
+
qcmTimer: 60,
|
|
175
|
+
freeTimer: 60,
|
|
176
|
+
getPropositions,
|
|
177
|
+
isAnswerValid,
|
|
178
|
+
maxAllowedQuestions: 10,
|
|
179
|
+
subject: "Physique",
|
|
180
|
+
hasHintAndCorrection: true,
|
|
181
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Exercise } from "../../exercises/exercise";
|
|
2
|
-
import { ReactionSpecies } from "../../pc/molecularChemistry/reaction";
|
|
2
|
+
import { ReactionSpecies } from "../../pc/constants/molecularChemistry/reaction";
|
|
3
3
|
type Identifiers = {
|
|
4
4
|
reactionArray: ReactionSpecies[];
|
|
5
5
|
randomSpacieIndex: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chemicalReactionsProduct.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/chemicalReactionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAEL,eAAe,EAEhB,MAAM,
|
|
1
|
+
{"version":3,"file":"chemicalReactionsProduct.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/chemicalReactionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAEL,eAAe,EAEhB,MAAM,gDAAgD,CAAC;AAGxD,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,eAAe,EAAE,CAAC;IACjC,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAyCF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAe1D,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.chemicalReactionsProduct = void 0;
|
|
|
4
4
|
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
|
-
const reaction_1 = require("../../pc/molecularChemistry/reaction");
|
|
7
|
+
const reaction_1 = require("../../pc/constants/molecularChemistry/reaction");
|
|
8
8
|
const shuffle_1 = require("../../utils/shuffle");
|
|
9
9
|
const getChemicalReactionsProduct = () => {
|
|
10
10
|
const reaction = reaction_1.ReactionConstructor.randomReaction();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beerLambertRandomValue.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/dosage/beerLambertRandomValue.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAmNF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"beerLambertRandomValue.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/dosage/beerLambertRandomValue.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAmNF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAchE,CAAC"}
|
|
@@ -5,11 +5,11 @@ const frenchify_1 = require("../../../math/utils/latex/frenchify");
|
|
|
5
5
|
const exercise_1 = require("../../../exercises/exercise");
|
|
6
6
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
7
7
|
const round_1 = require("../../../math/utils/round");
|
|
8
|
-
const molecule_1 = require("../../../pc/molecularChemistry/molecule");
|
|
9
8
|
const random_1 = require("../../../utils/random");
|
|
10
9
|
const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
|
|
11
10
|
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
12
11
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
12
|
+
const molecule_1 = require("../../../pc/constants/molecularChemistry/molecule");
|
|
13
13
|
const getBeerLambertRandomValueQuestion = () => {
|
|
14
14
|
const molecule = (0, random_1.random)(molecule_1.molecules);
|
|
15
15
|
const concentration = (0, round_1.round)((0, randfloat_1.randfloat)(0.01, 0.1), 2); // Concentration in mol/L
|
|
@@ -160,4 +160,5 @@ exports.BeerLambertRandomValueExercise = {
|
|
|
160
160
|
getPropositions,
|
|
161
161
|
isAnswerValid,
|
|
162
162
|
subject: "Chimie",
|
|
163
|
+
hasHintAndCorrection: true,
|
|
163
164
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
concentration: number;
|
|
4
|
+
quantity: number;
|
|
5
|
+
volume: number;
|
|
6
|
+
variable: "C" | "n" | "V";
|
|
7
|
+
};
|
|
8
|
+
export declare const concentrationCalculation: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=concentrationCalculation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concentrationCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/dosage/concentrationCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAC3B,CAAC;AA6IF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.concentrationCalculation = 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 randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
9
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
10
|
+
const getConcentrationCalculationQuestion = () => {
|
|
11
|
+
const concentration = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 2), 2); // Concentration en mol/L
|
|
12
|
+
const quantity = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 5), 2); // Quantité de matière en mol
|
|
13
|
+
const volume = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 2), 2); // Volume en L
|
|
14
|
+
const variableIndex = (0, randint_1.randint)(0, 3);
|
|
15
|
+
const variables = ["C", "n", "V"];
|
|
16
|
+
const variable = variables[variableIndex];
|
|
17
|
+
let questionText, answer;
|
|
18
|
+
switch (variable) {
|
|
19
|
+
case "C":
|
|
20
|
+
questionText = `Vous avez une solution contenant une quantité de matière $n = ${(0, frenchify_1.frenchify)(quantity)}\\ \\text{mol}$ dissoute dans un volume $V = ${(0, frenchify_1.frenchify)(volume)}\\ \\text{L}$. Déterminez la concentration $[X_i]$ en $\\text{mol.L}^{-1}$ de cette solution.`;
|
|
21
|
+
answer = (0, round_1.round)(quantity / volume, 2);
|
|
22
|
+
break;
|
|
23
|
+
case "n":
|
|
24
|
+
questionText = `Vous avez une solution de concentration $[X_i] = ${(0, frenchify_1.frenchify)(concentration)}\\ \\text{mol.L}^{-1}$ dans un volume $V = ${(0, frenchify_1.frenchify)(volume)}\\ \\text{L}$. Déterminez la quantité de matière $n$ en $\\text{mol}$ de cette solution.`;
|
|
25
|
+
answer = (0, round_1.round)(concentration * volume, 2);
|
|
26
|
+
break;
|
|
27
|
+
case "V":
|
|
28
|
+
questionText = `Vous avez une solution de concentration $[X_i] = ${(0, frenchify_1.frenchify)(concentration)}\\ \\text{mol.L}^{-1}$ contenant une quantité de matière $n = ${(0, frenchify_1.frenchify)(quantity)}\\ \\text{mol}$. Déterminez le volume $V$ en $\\text{L}$ de cette solution.`;
|
|
29
|
+
answer = (0, round_1.round)(quantity / concentration, 2);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
const hint = `La concentration en quantité de matière $[X_i]$ d'une espèce chimique en solution est le quotient de la quantité de matière $n$ de soluté par le volume $V_{\\text{solution}}$ de la solution :
|
|
33
|
+
$$
|
|
34
|
+
[X_i] = \\frac{n}{V_{\\text{solution}}}
|
|
35
|
+
$$
|
|
36
|
+
Réarrangez cette formule pour isoler la variable à trouver.`;
|
|
37
|
+
const correction = `La formule de la concentration est :
|
|
38
|
+
$$
|
|
39
|
+
[X_i] = \\frac{n}{V}
|
|
40
|
+
$$
|
|
41
|
+
|
|
42
|
+
Pour résoudre ce problème, nous devons réorganiser la formule pour isoler la variable inconnue.
|
|
43
|
+
|
|
44
|
+
${variable === "C"
|
|
45
|
+
? `$$[X_i] = \\frac{n}{V} = \\frac{${(0, frenchify_1.frenchify)(quantity)}}{${(0, frenchify_1.frenchify)(volume)}} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{mol.L}^{-1}$$`
|
|
46
|
+
: variable === "n"
|
|
47
|
+
? `$$n = [X_i] \\times V = ${(0, frenchify_1.frenchify)(concentration)} \\times ${(0, frenchify_1.frenchify)(volume)} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{mol}$$`
|
|
48
|
+
: `$$V = \\frac{n}{[X_i]} = \\frac{${(0, frenchify_1.frenchify)(quantity)}}{${(0, frenchify_1.frenchify)(concentration)}} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{L}$$`}`;
|
|
49
|
+
const question = {
|
|
50
|
+
answer: answer.toTree().toTex(),
|
|
51
|
+
instruction: questionText,
|
|
52
|
+
hint,
|
|
53
|
+
correction,
|
|
54
|
+
keys: ["C", "n", "V"],
|
|
55
|
+
answerFormat: "tex",
|
|
56
|
+
identifiers: {
|
|
57
|
+
concentration,
|
|
58
|
+
quantity,
|
|
59
|
+
volume,
|
|
60
|
+
variable,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
return question;
|
|
64
|
+
};
|
|
65
|
+
const getPropositions = (n, { answer, concentration, quantity, volume, variable }) => {
|
|
66
|
+
const propositions = [];
|
|
67
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
68
|
+
const wrongAnswers = [
|
|
69
|
+
variable === "C"
|
|
70
|
+
? (0, round_1.round)(quantity * volume, 2)
|
|
71
|
+
: (0, round_1.round)(quantity / volume, 2),
|
|
72
|
+
variable === "n"
|
|
73
|
+
? (0, round_1.round)(concentration / volume, 2)
|
|
74
|
+
: (0, round_1.round)(concentration * volume, 2),
|
|
75
|
+
variable === "V"
|
|
76
|
+
? (0, round_1.round)(quantity * concentration, 2)
|
|
77
|
+
: (0, round_1.round)(quantity / concentration, 2),
|
|
78
|
+
];
|
|
79
|
+
wrongAnswers.forEach((wrongAnswer) => {
|
|
80
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toTree().toTex());
|
|
81
|
+
});
|
|
82
|
+
while (propositions.length < n) {
|
|
83
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(0.1, 5, 2).toTree().toTex());
|
|
84
|
+
}
|
|
85
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
86
|
+
};
|
|
87
|
+
const isAnswerValid = (ans, { answer, variable, concentration, quantity, volume }) => {
|
|
88
|
+
let validanswer;
|
|
89
|
+
switch (variable) {
|
|
90
|
+
case "C":
|
|
91
|
+
validanswer = (0, round_1.round)(quantity / volume, 2);
|
|
92
|
+
break;
|
|
93
|
+
case "n":
|
|
94
|
+
validanswer = (0, round_1.round)(concentration * volume, 2);
|
|
95
|
+
break;
|
|
96
|
+
case "V":
|
|
97
|
+
validanswer = (0, round_1.round)(quantity / concentration, 2);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
const latexs = [
|
|
101
|
+
...validanswer.toTree().toAllValidTexs(),
|
|
102
|
+
validanswer.toScientific(2).toTex(),
|
|
103
|
+
];
|
|
104
|
+
return latexs.includes(ans);
|
|
105
|
+
};
|
|
106
|
+
exports.concentrationCalculation = {
|
|
107
|
+
id: "concentrationCalculation",
|
|
108
|
+
label: "Calculer la concentration d'un élément dans une solution",
|
|
109
|
+
levels: ["1reSpé"],
|
|
110
|
+
isSingleStep: true,
|
|
111
|
+
sections: ["Chimie des solutions"],
|
|
112
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConcentrationCalculationQuestion, nb),
|
|
113
|
+
qcmTimer: 60,
|
|
114
|
+
freeTimer: 60,
|
|
115
|
+
getPropositions,
|
|
116
|
+
isAnswerValid,
|
|
117
|
+
subject: "Chimie",
|
|
118
|
+
hasHintAndCorrection: true,
|
|
119
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
concentration: number;
|
|
4
|
+
mass: number;
|
|
5
|
+
molarMass: number;
|
|
6
|
+
variable: "C" | "t" | "M";
|
|
7
|
+
};
|
|
8
|
+
export declare const concentrationFromMassCalculation: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=concentrationFromMassCalculation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concentrationFromMassCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/dosage/concentrationFromMassCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CAC3B,CAAC;AA2IF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAelE,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.concentrationFromMassCalculation = 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 randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
9
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
10
|
+
const getConcentrationFromMassCalculationQuestion = () => {
|
|
11
|
+
const concentration = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 2), 2); // Concentration en mol/L
|
|
12
|
+
const mass = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 5), 2); // Concentration en masse en g/L
|
|
13
|
+
const molarMass = (0, round_1.round)((0, randfloat_1.randfloat)(10, 200), 2); // Masse molaire en g/mol
|
|
14
|
+
const variableIndex = (0, randint_1.randint)(0, 3);
|
|
15
|
+
const variables = ["C", "t", "M"];
|
|
16
|
+
const variable = variables[variableIndex];
|
|
17
|
+
let questionText, answer;
|
|
18
|
+
switch (variable) {
|
|
19
|
+
case "C":
|
|
20
|
+
questionText = `Vous avez une solution avec une concentration en masse $t = ${(0, frenchify_1.frenchify)(mass)}\\ \\text{g.L}^{-1}$ et une masse molaire $M = ${(0, frenchify_1.frenchify)(molarMass)}\\ \\text{g.mol}^{-1}$. Déterminez la concentration $C$ en $\\text{mol.L}^{-1}$ de cette solution.`;
|
|
21
|
+
answer = (0, round_1.round)(mass / molarMass, 2);
|
|
22
|
+
break;
|
|
23
|
+
case "t":
|
|
24
|
+
questionText = `Vous avez une solution avec une concentration $C = ${(0, frenchify_1.frenchify)(concentration)}\\ \\text{mol.L}^{-1}$ et une masse molaire $M = ${(0, frenchify_1.frenchify)(molarMass)}\\ \\text{g.mol}^{-1}$. Déterminez la concentration en masse $t$ en $\\text{g.L}^{-1}$ de cette solution.`;
|
|
25
|
+
answer = (0, round_1.round)(concentration * molarMass, 2);
|
|
26
|
+
break;
|
|
27
|
+
case "M":
|
|
28
|
+
questionText = `Vous avez une solution avec une concentration en masse $t = ${(0, frenchify_1.frenchify)(mass)}\\ \\text{g.L}^{-1}$ et une concentration $C = ${(0, frenchify_1.frenchify)(concentration)}\\ \\text{mol.L}^{-1}$. Déterminez la masse molaire $M$ en $\\text{g.mol}^{-1}$ de cette solution.`;
|
|
29
|
+
answer = (0, round_1.round)(mass / concentration, 2);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
const hint = `La relation entre la concentration en quantité de matière $C$, la concentration en masse $t$, et la masse molaire $M$ est donnée par :
|
|
33
|
+
$$
|
|
34
|
+
C = \\frac{t}{M}
|
|
35
|
+
$$
|
|
36
|
+
Réarrangez cette formule pour isoler la variable à trouver.`;
|
|
37
|
+
const correction = `La relation entre la concentration en quantité de matière, la concentration en masse et la masse molaire est :
|
|
38
|
+
$$
|
|
39
|
+
C = \\frac{t}{M}
|
|
40
|
+
$$
|
|
41
|
+
|
|
42
|
+
Pour résoudre ce problème, nous devons réorganiser la formule pour isoler la variable inconnue.
|
|
43
|
+
|
|
44
|
+
${variable === "C"
|
|
45
|
+
? `$$C = \\frac{t}{M} = \\frac{${(0, frenchify_1.frenchify)(mass)}}{${(0, frenchify_1.frenchify)(molarMass)}} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{mol.L}^{-1}$$`
|
|
46
|
+
: variable === "t"
|
|
47
|
+
? `$$t = C \\times M = ${(0, frenchify_1.frenchify)(concentration)} \\times ${(0, frenchify_1.frenchify)(molarMass)} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{g.L}^{-1}$$`
|
|
48
|
+
: `$$M = \\frac{t}{C} = \\frac{${(0, frenchify_1.frenchify)(mass)}}{${(0, frenchify_1.frenchify)(concentration)}} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{g.mol}^{-1}$$`}`;
|
|
49
|
+
const question = {
|
|
50
|
+
answer: answer.toTree().toTex(),
|
|
51
|
+
instruction: questionText,
|
|
52
|
+
hint,
|
|
53
|
+
correction,
|
|
54
|
+
keys: ["C", "t", "M"],
|
|
55
|
+
answerFormat: "tex",
|
|
56
|
+
identifiers: {
|
|
57
|
+
concentration,
|
|
58
|
+
mass,
|
|
59
|
+
molarMass,
|
|
60
|
+
variable,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
return question;
|
|
64
|
+
};
|
|
65
|
+
const getPropositions = (n, { answer, concentration, mass, molarMass, variable }) => {
|
|
66
|
+
const propositions = [];
|
|
67
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
68
|
+
const wrongAnswers = [
|
|
69
|
+
variable === "C" ? (0, round_1.round)(mass * molarMass, 2) : (0, round_1.round)(mass / molarMass, 2),
|
|
70
|
+
variable === "t"
|
|
71
|
+
? (0, round_1.round)(concentration / molarMass, 2)
|
|
72
|
+
: (0, round_1.round)(concentration * molarMass, 2),
|
|
73
|
+
variable === "M"
|
|
74
|
+
? (0, round_1.round)(mass * concentration, 2)
|
|
75
|
+
: (0, round_1.round)(mass / concentration, 2),
|
|
76
|
+
];
|
|
77
|
+
wrongAnswers.forEach((wrongAnswer) => {
|
|
78
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toTree().toTex());
|
|
79
|
+
});
|
|
80
|
+
while (propositions.length < n) {
|
|
81
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(0.1, 5, 2).toTree().toTex());
|
|
82
|
+
}
|
|
83
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
84
|
+
};
|
|
85
|
+
const isAnswerValid = (ans, { answer, variable, mass, molarMass, concentration }) => {
|
|
86
|
+
let validanswer;
|
|
87
|
+
switch (variable) {
|
|
88
|
+
case "C":
|
|
89
|
+
validanswer = (0, round_1.round)(mass / molarMass, 2);
|
|
90
|
+
break;
|
|
91
|
+
case "t":
|
|
92
|
+
validanswer = (0, round_1.round)(concentration * molarMass, 2);
|
|
93
|
+
break;
|
|
94
|
+
case "M":
|
|
95
|
+
validanswer = (0, round_1.round)(mass / concentration, 2);
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
const latexs = [
|
|
99
|
+
...validanswer.toTree().toAllValidTexs(),
|
|
100
|
+
validanswer.toScientific(2).toTex(),
|
|
101
|
+
];
|
|
102
|
+
return latexs.includes(ans);
|
|
103
|
+
};
|
|
104
|
+
exports.concentrationFromMassCalculation = {
|
|
105
|
+
id: "concentrationFromMassCalculation",
|
|
106
|
+
label: "Calculer la concentration à partir de la concentration en masse et la masse molaire",
|
|
107
|
+
levels: ["1reSpé"],
|
|
108
|
+
isSingleStep: true,
|
|
109
|
+
sections: ["Chimie des solutions"],
|
|
110
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConcentrationFromMassCalculationQuestion, nb),
|
|
111
|
+
qcmTimer: 60,
|
|
112
|
+
freeTimer: 60,
|
|
113
|
+
getPropositions,
|
|
114
|
+
isAnswerValid,
|
|
115
|
+
subject: "Chimie",
|
|
116
|
+
hasHintAndCorrection: true,
|
|
117
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/dosage/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/dosage/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC"}
|
|
@@ -15,3 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./beerLambertRandomValue"), exports);
|
|
18
|
+
__exportStar(require("./concentrationCalculation"), exports);
|
|
19
|
+
__exportStar(require("./concentrationFromMassCalculation"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculateIntensity.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/calculateIntensity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAIlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAqDF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAapD,CAAC"}
|