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
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OhmLawExercise = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const round_1 = require("../../../math/utils/round");
|
|
7
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const getOhmLawQuestion = () => {
|
|
10
|
+
const resistance = (0, randint_1.randint)(1, 50);
|
|
11
|
+
const current = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 4, 2), 2);
|
|
12
|
+
const voltage = (0, round_1.round)(resistance * current, 2);
|
|
13
|
+
const variables = [
|
|
14
|
+
{ name: "résistance", value: resistance, unit: " \\ \\Omega", symbol: "R" },
|
|
15
|
+
{ name: "courant", value: current, unit: "\\ A", symbol: "I" },
|
|
16
|
+
{ name: "tension", value: voltage, unit: "\\ V", symbol: "U" },
|
|
17
|
+
];
|
|
18
|
+
const randomIndex = (0, randint_1.randint)(0, variables.length);
|
|
19
|
+
const targetVariable = variables[randomIndex];
|
|
20
|
+
const knownVariables = variables.filter((_, index) => index !== randomIndex);
|
|
21
|
+
const instruction = `Lors d'une expérience en classe de physique, vous devez étudier le comportement d'un conducteur ohmique. Vous avez connecté le conducteur à un circuit électrique et mesuré les valeurs suivantes :
|
|
22
|
+
- ${knownVariables[0].name.charAt(0).toUpperCase() +
|
|
23
|
+
knownVariables[0].name.slice(1)} : $${knownVariables[0].symbol} = ${(0, round_1.round)(knownVariables[0].value, 2)
|
|
24
|
+
.toTree()
|
|
25
|
+
.toTex()} ${knownVariables[0].unit}$
|
|
26
|
+
- ${knownVariables[1].name.charAt(0).toUpperCase() +
|
|
27
|
+
knownVariables[1].name.slice(1)} : $${knownVariables[1].symbol} = ${(0, round_1.round)(knownVariables[1].value, 2)
|
|
28
|
+
.toTree()
|
|
29
|
+
.toTex()} ${knownVariables[1].unit}$. \n
|
|
30
|
+
Déterminez ${targetVariable.name === "tension" || targetVariable.name === "résistance"
|
|
31
|
+
? "la"
|
|
32
|
+
: "le"} ${targetVariable.name} ${targetVariable.name === "tension"
|
|
33
|
+
? "aux bords du"
|
|
34
|
+
: targetVariable.name === "courant"
|
|
35
|
+
? "qui traverse le"
|
|
36
|
+
: "du"} conducteur.`;
|
|
37
|
+
const hint = `Rappelez-vous la loi d'Ohm : $U = R \\cdot I$.`;
|
|
38
|
+
const correction = `La loi d'Ohm est donnée par :
|
|
39
|
+
$U = R \\cdot I$. En utilisant les valeurs fournies pour ${knownVariables[0].name} et ${knownVariables[1].name}, vous pouvez résoudre pour ${targetVariable.name === "tension" || targetVariable.name === "résistance"
|
|
40
|
+
? "la"
|
|
41
|
+
: "le"} ${targetVariable.name} :
|
|
42
|
+
$${targetVariable.symbol} = ${(0, round_1.round)(knownVariables[0].value, 2)
|
|
43
|
+
.toTree()
|
|
44
|
+
.toTex()} \\times ${(0, round_1.round)(knownVariables[1].value, 2)
|
|
45
|
+
.toTree()
|
|
46
|
+
.toTex()} = ${(0, round_1.round)(targetVariable.value, 2).toTree().toTex()}\\ ${targetVariable.unit}$. \n
|
|
47
|
+
Donc, ${targetVariable.name === "tension" || targetVariable.name === "résistance"
|
|
48
|
+
? "la"
|
|
49
|
+
: "le"} ${targetVariable.name} est $${(0, round_1.round)(targetVariable.value, 2)
|
|
50
|
+
.toTree()
|
|
51
|
+
.toTex()}\\ ${targetVariable.unit}$.`;
|
|
52
|
+
const question = {
|
|
53
|
+
answer: (0, round_1.round)(targetVariable.value, 2).toTree().toTex(),
|
|
54
|
+
instruction,
|
|
55
|
+
hint,
|
|
56
|
+
correction,
|
|
57
|
+
keys: [],
|
|
58
|
+
answerFormat: "tex",
|
|
59
|
+
identifiers: {
|
|
60
|
+
voltage,
|
|
61
|
+
current,
|
|
62
|
+
resistance,
|
|
63
|
+
target: targetVariable.name,
|
|
64
|
+
targetValue: targetVariable.value,
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
return question;
|
|
68
|
+
};
|
|
69
|
+
const getPropositions = (n, { answer, voltage, current, resistance, target }) => {
|
|
70
|
+
const propositions = [];
|
|
71
|
+
(0, exercise_1.addValidProp)(propositions, answer, "tex");
|
|
72
|
+
if (target === "tension") {
|
|
73
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(voltage * (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
74
|
+
.toTree()
|
|
75
|
+
.toTex());
|
|
76
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(voltage / (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
77
|
+
.toTree()
|
|
78
|
+
.toTex());
|
|
79
|
+
}
|
|
80
|
+
else if (target === "courant") {
|
|
81
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(current * (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
82
|
+
.toTree()
|
|
83
|
+
.toTex());
|
|
84
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(current / (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
85
|
+
.toTree()
|
|
86
|
+
.toTex());
|
|
87
|
+
}
|
|
88
|
+
else if (target === "résistance") {
|
|
89
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(resistance * (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
90
|
+
.toTree()
|
|
91
|
+
.toTex());
|
|
92
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(resistance / (0, randfloat_1.randfloat)(0.1, 2), 2)
|
|
93
|
+
.toTree()
|
|
94
|
+
.toTex());
|
|
95
|
+
}
|
|
96
|
+
while (propositions.length < n) {
|
|
97
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(10, 100, 2).toTree().toTex());
|
|
98
|
+
}
|
|
99
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
100
|
+
};
|
|
101
|
+
const isAnswerValid = (ans, { answer, targetValue }) => {
|
|
102
|
+
const validAnswer1 = (0, round_1.round)(targetValue, 2).toTree().toTex();
|
|
103
|
+
const validAnswer2 = targetValue.toScientific(2).toTex();
|
|
104
|
+
const validAnswer3 = targetValue.toScientific(1).toTex();
|
|
105
|
+
const validAnswer4 = targetValue.toScientific(3).toTex();
|
|
106
|
+
let latexs = [];
|
|
107
|
+
latexs.push(validAnswer1, validAnswer2, validAnswer3, validAnswer4);
|
|
108
|
+
return latexs.includes(ans);
|
|
109
|
+
};
|
|
110
|
+
exports.OhmLawExercise = {
|
|
111
|
+
id: "ohmLaw",
|
|
112
|
+
label: "Utiliser la loi d'Ohm pour calculer tension, courant ou résistance",
|
|
113
|
+
levels: ["2nde"],
|
|
114
|
+
isSingleStep: true,
|
|
115
|
+
sections: ["Électricité"],
|
|
116
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getOhmLawQuestion, nb),
|
|
117
|
+
qcmTimer: 60,
|
|
118
|
+
freeTimer: 60,
|
|
119
|
+
getPropositions,
|
|
120
|
+
isAnswerValid,
|
|
121
|
+
hasHintAndCorrection: true,
|
|
122
|
+
subject: "Physique",
|
|
123
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG,EAAE,CAAC;AA6FtB,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAgB3D,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ohmicConductorOrGenerator = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const random_1 = require("../../../utils/random");
|
|
9
|
+
const getOhmicConductorOrGeneratorQuestion = () => {
|
|
10
|
+
const exo = generateExercise();
|
|
11
|
+
const question = {
|
|
12
|
+
answer: exo.answer,
|
|
13
|
+
instruction: exo.instruction,
|
|
14
|
+
commands: exo.ggb.commands,
|
|
15
|
+
coords: [8, 40, -5, 30],
|
|
16
|
+
options: exo.ggb.getOptions(),
|
|
17
|
+
keys: [],
|
|
18
|
+
hint: exo.hint,
|
|
19
|
+
correction: exo.correction,
|
|
20
|
+
answerFormat: "raw",
|
|
21
|
+
identifiers: {},
|
|
22
|
+
};
|
|
23
|
+
return question;
|
|
24
|
+
};
|
|
25
|
+
const getPropositions = (n, { answer }) => {
|
|
26
|
+
const propositions = [];
|
|
27
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Conducteur ohmique", "raw");
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Générateur", "raw");
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir", "raw");
|
|
31
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
32
|
+
};
|
|
33
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
34
|
+
return ans === answer;
|
|
35
|
+
};
|
|
36
|
+
const generateExercise = () => {
|
|
37
|
+
const type = (0, random_1.random)(["Conducteur ohmique", "Générateur"]);
|
|
38
|
+
const ggb = getGgb(type);
|
|
39
|
+
const instruction = `Après avoir relevé l'intensité du courant circulant dans un dipôle pour différentes tensions entre ses bornes, Nous avons obetnu le graphique ci-dessous.
|
|
40
|
+
|
|
41
|
+
La dipôle est-elle est un générateur ou un conducteur ohmique ?`;
|
|
42
|
+
const hint = getHint(type);
|
|
43
|
+
const correction = getCorrection(type);
|
|
44
|
+
return {
|
|
45
|
+
instruction,
|
|
46
|
+
ggb,
|
|
47
|
+
answer: type,
|
|
48
|
+
hint,
|
|
49
|
+
correction,
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
const getGgb = (type) => {
|
|
53
|
+
const points = [];
|
|
54
|
+
for (let x = 22; x < 33; x += 2) {
|
|
55
|
+
const y = type === "Générateur"
|
|
56
|
+
? Math.pow(10, 15) / Math.pow(x, 10)
|
|
57
|
+
: 0.00000001 * Math.pow(x, 6);
|
|
58
|
+
points.push(`Point({${x},${y}})`);
|
|
59
|
+
}
|
|
60
|
+
return type === "Générateur"
|
|
61
|
+
? new geogebraConstructor_1.GeogebraConstructor([`Function(${Math.pow(10, 15)}/x^10,1,${(0, randint_1.randint)(40, 51)})`].concat(points), { axisLabels: ["$\\tiny I(A)$", "$\\tiny U(V)$"] })
|
|
62
|
+
: new geogebraConstructor_1.GeogebraConstructor([`Function(0.00000001*x^6,1,${(0, randint_1.randint)(40, 51)})`].concat(points), { axisLabels: ["$\\tiny I(A)$", "$\\tiny U(V)$"] });
|
|
63
|
+
};
|
|
64
|
+
const getHint = (type) => {
|
|
65
|
+
return type === "Générateur"
|
|
66
|
+
? `Rappel : la tension $U$ aux bornes du générateur peut être exprimée par la relation $U=E-r \\cdot I$.`
|
|
67
|
+
: `Rappel de la loi d'ohm : $U=R \\cdot I$.`;
|
|
68
|
+
};
|
|
69
|
+
const getCorrection = (type) => {
|
|
70
|
+
switch (type) {
|
|
71
|
+
case "Générateur":
|
|
72
|
+
return `Selon la relation qui exprime la tension $U$ aux bornes du générateur, $U = E-r \\cdot I$,\n
|
|
73
|
+
on en déduit que plus l'intensité $I$ augmente, plus la tension $U$ aux bornes du générateur diminue, ce qui correspond bien au graphique montré.
|
|
74
|
+
`;
|
|
75
|
+
case "Conducteur ohmique":
|
|
76
|
+
return `Selon la loi d'ohm qui exprime la tension $U$ aux bornes du conducteur ohmique, $U = R \\cdot I$,\n
|
|
77
|
+
on en déduit que plus l'intensité $I$ augmente, plus la tension $U$ aux bornes du conducteur ohmique augmente, ce qui correspond bien au graphique montré.`;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
exports.ohmicConductorOrGenerator = {
|
|
81
|
+
id: "ohmicConductorOrGenerator",
|
|
82
|
+
label: "Comparaisons des graphiques de tension de dipôle",
|
|
83
|
+
levels: ["2nde"],
|
|
84
|
+
isSingleStep: true,
|
|
85
|
+
sections: ["Électricité"],
|
|
86
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getOhmicConductorOrGeneratorQuestion, nb, 10),
|
|
87
|
+
qcmTimer: 60,
|
|
88
|
+
freeTimer: 60,
|
|
89
|
+
getPropositions,
|
|
90
|
+
isAnswerValid,
|
|
91
|
+
answerType: "QCM",
|
|
92
|
+
maxAllowedQuestions: 10,
|
|
93
|
+
subject: "Physique",
|
|
94
|
+
hasHintAndCorrection: true,
|
|
95
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calorificValue.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/calorificValue.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAgGF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calorificValue = 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 divideUnit_1 = require("../../../pc/units/divideUnit");
|
|
9
|
+
const energyUnit_1 = require("../../../pc/units/energyUnit");
|
|
10
|
+
const massUnits_1 = require("../../../pc/units/massUnits");
|
|
11
|
+
const getCalorificValueQuestion = () => {
|
|
12
|
+
const exo = generateExercise();
|
|
13
|
+
const question = {
|
|
14
|
+
answer: exo.answer.toTex(),
|
|
15
|
+
instruction: exo.instruction,
|
|
16
|
+
hint: exo.hint,
|
|
17
|
+
correction: exo.correction,
|
|
18
|
+
keys: [],
|
|
19
|
+
answerFormat: "tex",
|
|
20
|
+
identifiers: { pc: exo.pc, mass: exo.mass },
|
|
21
|
+
};
|
|
22
|
+
return question;
|
|
23
|
+
};
|
|
24
|
+
const getPropositions = (n, { answer, pc, mass }) => {
|
|
25
|
+
const propositions = [];
|
|
26
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
27
|
+
generatePropositions(pc, mass).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value.toTex()));
|
|
28
|
+
while (propositions.length < n) {
|
|
29
|
+
let random = new measure_1.Measure(-(0, randint_1.randint)(60, 91) * (0, randint_1.randint)(2, 9, [mass]) * 1000, (0, randint_1.randint)(-2, 3), energyUnit_1.EnergyUnit.J);
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, random.toTex());
|
|
31
|
+
}
|
|
32
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
33
|
+
};
|
|
34
|
+
const isAnswerValid = (ans, { answer, pc, mass }) => {
|
|
35
|
+
const q = -pc * mass * 1000;
|
|
36
|
+
const qMeasure = new measure_1.Measure(q, 0);
|
|
37
|
+
return [answer, q + "", qMeasure.toTex()].includes(ans);
|
|
38
|
+
};
|
|
39
|
+
const generatePropositions = (pc, mass) => {
|
|
40
|
+
const pcMeasure = new measure_1.Measure(pc, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.J, massUnits_1.MassUnit.kg));
|
|
41
|
+
const massMeasure = new measure_1.Measure(mass, 0, massUnits_1.MassUnit.kg);
|
|
42
|
+
const first = pcMeasure.times(massMeasure).times(-1).toSignificant(6);
|
|
43
|
+
return [first];
|
|
44
|
+
};
|
|
45
|
+
const generateExercise = () => {
|
|
46
|
+
const pc = (0, randint_1.randint)(60, 91);
|
|
47
|
+
const mass = (0, randint_1.randint)(2, 11);
|
|
48
|
+
const massMeasure = new measure_1.Measure(mass, 0, massUnits_1.MassUnit.kg);
|
|
49
|
+
const pcMeasure = new measure_1.Measure(pc, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.kJ, massUnits_1.MassUnit.kg));
|
|
50
|
+
const pcMeasureJ = new measure_1.Measure(pc * 1000, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.J, massUnits_1.MassUnit.kg));
|
|
51
|
+
const instruction = `Un échantillon d'un combustible $X$ de masse $${massMeasure.toTex({ notScientific: true })}$ est brûlé complètement. Le pouvoir calorifique de ce combustible est $PC = ${pcMeasure.toTex({ notScientific: true })}$.
|
|
52
|
+
|
|
53
|
+
Calculez l'énergie totale $(Q)$ libérée lors de la combustion de cet échantillon en joules $(J)$.`;
|
|
54
|
+
const answer = massMeasure.times(pcMeasureJ).times(-1).toSignificant(6);
|
|
55
|
+
const hint = `Rappel de la formule pour calculer l'énergie totale $(Q)$ libérée lors de la combustion :
|
|
56
|
+
- $Q = -m \\times PC$`;
|
|
57
|
+
const correction = `Appliquer la formule $Q = -m \\times PC$ :
|
|
58
|
+
1. Convertir les $${energyUnit_1.EnergyUnit.kJ.toTex()}$ en $${energyUnit_1.EnergyUnit.J.toTex()}$, $${pcMeasure.toTex({ notScientific: true })} \\Rightarrow ${pcMeasureJ.toTex({ notScientific: true })}$
|
|
59
|
+
2. $Q = -${massMeasure.toTex({
|
|
60
|
+
notScientific: true,
|
|
61
|
+
})} \\times ${pcMeasureJ.toTex({ notScientific: true })}$
|
|
62
|
+
3. $Q=${answer.toTex()}$`;
|
|
63
|
+
return { instruction, answer, hint, correction, pc, mass };
|
|
64
|
+
};
|
|
65
|
+
exports.calorificValue = {
|
|
66
|
+
id: "calorificValue",
|
|
67
|
+
label: "Calcul de l'énergie de transfert de combustion à l'aide du pouvoir calorifique",
|
|
68
|
+
levels: ["1reSpé"],
|
|
69
|
+
isSingleStep: true,
|
|
70
|
+
sections: ["Réaction chimique"],
|
|
71
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCalorificValueQuestion, nb),
|
|
72
|
+
qcmTimer: 60,
|
|
73
|
+
freeTimer: 60,
|
|
74
|
+
getPropositions,
|
|
75
|
+
isAnswerValid,
|
|
76
|
+
subject: "Physique",
|
|
77
|
+
hasHintAndCorrection: true,
|
|
78
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combustionTransferEnergy.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/combustionTransferEnergy.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAgGF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.combustionTransferEnergy = 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 divideUnit_1 = require("../../../pc/units/divideUnit");
|
|
10
|
+
const energyUnit_1 = require("../../../pc/units/energyUnit");
|
|
11
|
+
const getCombustionTransferEnergyQuestion = () => {
|
|
12
|
+
const exo = generateExercise();
|
|
13
|
+
const question = {
|
|
14
|
+
answer: exo.answer.toTex(),
|
|
15
|
+
instruction: exo.instruction,
|
|
16
|
+
hint: exo.hint,
|
|
17
|
+
correction: exo.correction,
|
|
18
|
+
keys: [],
|
|
19
|
+
answerFormat: "tex",
|
|
20
|
+
identifiers: { eComb: exo.eComb, quantity: exo.quantity },
|
|
21
|
+
};
|
|
22
|
+
return question;
|
|
23
|
+
};
|
|
24
|
+
const getPropositions = (n, { answer, eComb, quantity }) => {
|
|
25
|
+
const propositions = [];
|
|
26
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
27
|
+
generatePropositions(eComb, quantity).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value.toTex()));
|
|
28
|
+
while (propositions.length < n) {
|
|
29
|
+
let random = new measure_1.Measure(-(0, randint_1.randint)(60, 91) * (0, randint_1.randint)(2, 9, [quantity]) * 1000, (0, randint_1.randint)(-2, 3), energyUnit_1.EnergyUnit.J);
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, random.toTex());
|
|
31
|
+
}
|
|
32
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
33
|
+
};
|
|
34
|
+
const isAnswerValid = (ans, { answer, eComb, quantity }) => {
|
|
35
|
+
const q = eComb * quantity * 1000;
|
|
36
|
+
const qMeasure = new measure_1.Measure(q, 0);
|
|
37
|
+
return [answer, q + "", qMeasure.toTex()].includes(ans);
|
|
38
|
+
};
|
|
39
|
+
const generatePropositions = (eComb, quantity) => {
|
|
40
|
+
const eCombMeasure = new measure_1.Measure(eComb, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.J, AmountOfSubstance_1.AmountOfSubstance.mol));
|
|
41
|
+
const quantityMeasure = new measure_1.Measure(quantity, 0, AmountOfSubstance_1.AmountOfSubstance.mol);
|
|
42
|
+
const first = eCombMeasure.times(quantityMeasure).toSignificant(6);
|
|
43
|
+
return [first];
|
|
44
|
+
};
|
|
45
|
+
const generateExercise = () => {
|
|
46
|
+
const eComb = -(0, randint_1.randint)(60, 91);
|
|
47
|
+
const quantity = (0, randint_1.randint)(2, 9);
|
|
48
|
+
const quantityMeasure = new measure_1.Measure(quantity, 0, AmountOfSubstance_1.AmountOfSubstance.mol);
|
|
49
|
+
const eCombMeasure = new measure_1.Measure(eComb, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.kJ, AmountOfSubstance_1.AmountOfSubstance.mol));
|
|
50
|
+
const eCombMeasureJ = new measure_1.Measure(eComb * 1000, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.J, AmountOfSubstance_1.AmountOfSubstance.mol));
|
|
51
|
+
const instruction = `Un échantillon d'un combustible $X$ de $${quantity}$ moles est brûlé complètement. L'énergie molaire de combustion de ce combustible est $E_{comb} = ${eCombMeasure.toTex({ notScientific: true })}$.
|
|
52
|
+
|
|
53
|
+
Calculez l'énergie totale $(Q)$ libérée lors de la combustion de cet échantillon en joules $(J)$.`;
|
|
54
|
+
const answer = quantityMeasure.times(eCombMeasureJ).toSignificant(6);
|
|
55
|
+
const hint = `Rappel de la formule pour calculer l'énergie totale $(Q)$ libérée lors de la combustion :
|
|
56
|
+
- $Q = n \\times E_{comb}$`;
|
|
57
|
+
const correction = `Appliquer la formule $Q = n \\times E_{comb}$ :
|
|
58
|
+
1. Convertir les $${energyUnit_1.EnergyUnit.kJ.toTex()}$ en $${energyUnit_1.EnergyUnit.J.toTex()}$, $${eCombMeasure.toTex({ notScientific: true })} \\Rightarrow ${eCombMeasureJ.toTex({ notScientific: true })}$
|
|
59
|
+
2. $Q = ${quantityMeasure.toTex({
|
|
60
|
+
notScientific: true,
|
|
61
|
+
})} \\times ${eCombMeasure.toTex({ notScientific: true })}$
|
|
62
|
+
3. $Q=${answer.toTex()}$`;
|
|
63
|
+
return { instruction, answer, hint, correction, eComb, quantity };
|
|
64
|
+
};
|
|
65
|
+
exports.combustionTransferEnergy = {
|
|
66
|
+
id: "combustionTransferEnergy",
|
|
67
|
+
label: "Calcul de l'énergie de transfert de combustion",
|
|
68
|
+
levels: ["1reSpé"],
|
|
69
|
+
isSingleStep: true,
|
|
70
|
+
sections: ["Réaction chimique"],
|
|
71
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCombustionTransferEnergyQuestion, nb),
|
|
72
|
+
qcmTimer: 60,
|
|
73
|
+
freeTimer: 60,
|
|
74
|
+
getPropositions,
|
|
75
|
+
isAnswerValid,
|
|
76
|
+
subject: "Physique",
|
|
77
|
+
hasHintAndCorrection: true,
|
|
78
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
type: number;
|
|
4
|
+
pc?: number;
|
|
5
|
+
mass?: number;
|
|
6
|
+
eComb?: number;
|
|
7
|
+
quantity?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const combustionTransferEnergy2: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=combustionTransferEnergy2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combustionTransferEnergy2.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/combustionTransferEnergy2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AA2NF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.combustionTransferEnergy2 = 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 divideUnit_1 = require("../../../pc/units/divideUnit");
|
|
10
|
+
const energyUnit_1 = require("../../../pc/units/energyUnit");
|
|
11
|
+
const massUnits_1 = require("../../../pc/units/massUnits");
|
|
12
|
+
const getCombustionTransferEnergy2Question = () => {
|
|
13
|
+
const exo = generateExercise();
|
|
14
|
+
const identif = exo.type === 1
|
|
15
|
+
? { pc: exo.pc, mass: exo.mass }
|
|
16
|
+
: {
|
|
17
|
+
eComb: exo.eComb,
|
|
18
|
+
quantity: exo.quantity,
|
|
19
|
+
};
|
|
20
|
+
const question = {
|
|
21
|
+
answer: exo.answer.toTex(),
|
|
22
|
+
instruction: exo.instruction,
|
|
23
|
+
hint: exo.hint,
|
|
24
|
+
correction: exo.correction,
|
|
25
|
+
keys: [],
|
|
26
|
+
answerFormat: "tex",
|
|
27
|
+
identifiers: { type: exo.type, ...identif },
|
|
28
|
+
};
|
|
29
|
+
return question;
|
|
30
|
+
};
|
|
31
|
+
const getPropositions = (n, { answer, type, pc, mass, quantity, eComb }) => {
|
|
32
|
+
const propositions = [];
|
|
33
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
34
|
+
generatePropositions(type, pc, mass, eComb, quantity).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value.toTex()));
|
|
35
|
+
while (propositions.length < n) {
|
|
36
|
+
let random = new measure_1.Measure(-(0, randint_1.randint)(60, 91) * (0, randint_1.randint)(2, 9) * 1000, (0, randint_1.randint)(-2, 3), energyUnit_1.EnergyUnit.J);
|
|
37
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, random.toTex());
|
|
38
|
+
}
|
|
39
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
40
|
+
};
|
|
41
|
+
const isAnswerValid = (ans, { answer, type, pc, mass, eComb, quantity }) => {
|
|
42
|
+
const validAns = getValidAnswers(type, pc, mass, eComb, quantity);
|
|
43
|
+
validAns.push(answer);
|
|
44
|
+
return validAns.includes(ans);
|
|
45
|
+
};
|
|
46
|
+
const getValidAnswers = (type, pc = 0, mass = 0, eComb = 0, quantity = 0) => {
|
|
47
|
+
let q;
|
|
48
|
+
let qMeasure;
|
|
49
|
+
if (type === 1) {
|
|
50
|
+
q = -pc * mass * 1000;
|
|
51
|
+
qMeasure = new measure_1.Measure(q, 0);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
q = eComb * quantity * 1000;
|
|
55
|
+
qMeasure = new measure_1.Measure(q, 0);
|
|
56
|
+
}
|
|
57
|
+
return [q + "", qMeasure.toTex()];
|
|
58
|
+
};
|
|
59
|
+
const generatePropositions = (type, pc, mass, eComb, quantity) => {
|
|
60
|
+
return type === 1
|
|
61
|
+
? generateType1Propositins(pc, mass)
|
|
62
|
+
: generateType2Propositins(eComb, quantity);
|
|
63
|
+
};
|
|
64
|
+
const generateType1Propositins = (pc, mass) => {
|
|
65
|
+
const pcMeasure = new measure_1.Measure(pc, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.J, massUnits_1.MassUnit.kg));
|
|
66
|
+
const massMeasure = new measure_1.Measure(mass, 0, massUnits_1.MassUnit.kg);
|
|
67
|
+
const first = pcMeasure.times(massMeasure).times(-1).toSignificant(6);
|
|
68
|
+
return [first];
|
|
69
|
+
};
|
|
70
|
+
const generateType2Propositins = (eComb, quantity) => {
|
|
71
|
+
const eCombMeasure = new measure_1.Measure(eComb, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.J, AmountOfSubstance_1.AmountOfSubstance.mol));
|
|
72
|
+
const quantityMeasure = new measure_1.Measure(quantity, 0, AmountOfSubstance_1.AmountOfSubstance.mol);
|
|
73
|
+
const first = eCombMeasure.times(quantityMeasure).toSignificant(6);
|
|
74
|
+
return [first];
|
|
75
|
+
};
|
|
76
|
+
const generateExercise = () => {
|
|
77
|
+
const type = (0, randint_1.randint)(1, 3);
|
|
78
|
+
const exo = type === 1 ? getExoType1() : getExoType2();
|
|
79
|
+
return { type, ...exo };
|
|
80
|
+
};
|
|
81
|
+
const getExoType1 = () => {
|
|
82
|
+
const pc = (0, randint_1.randint)(60, 91);
|
|
83
|
+
const mass = (0, randint_1.randint)(2, 11);
|
|
84
|
+
const massMeasure = new measure_1.Measure(mass, 0, massUnits_1.MassUnit.kg);
|
|
85
|
+
const pcMeasure = new measure_1.Measure(pc, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.kJ, massUnits_1.MassUnit.kg));
|
|
86
|
+
const pcMeasureJ = new measure_1.Measure(pc * 1000, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.J, massUnits_1.MassUnit.kg));
|
|
87
|
+
const instruction = `Un échantillon d'un combustible $X$ de masse $${massMeasure.toTex({ notScientific: true })}$ est brûlé complètement. Le pouvoir calorifique de ce combustible est $PC = ${pcMeasure.toTex({ notScientific: true })}$.
|
|
88
|
+
|
|
89
|
+
Calculez l'énergie totale $(Q)$ libérée lors de la combustion de cet échantillon en joules $(J)$.`;
|
|
90
|
+
const answer = massMeasure.times(pcMeasureJ).times(-1).toSignificant(6);
|
|
91
|
+
const hint = `Rappel de la formule pour calculer l'énergie totale $(Q)$ libérée lors de la combustion :
|
|
92
|
+
- $Q = -m \\times PC$`;
|
|
93
|
+
const correction = `Appliquer la formule $Q = -m \\times PC$ :
|
|
94
|
+
1. Convertir les $${energyUnit_1.EnergyUnit.kJ.toTex()}$ en $${energyUnit_1.EnergyUnit.J.toTex()}$, $${pcMeasure.toTex({ notScientific: true })} \\Rightarrow ${pcMeasureJ.toTex({ notScientific: true })}$
|
|
95
|
+
2. $Q = -${massMeasure.toTex({
|
|
96
|
+
notScientific: true,
|
|
97
|
+
})} \\times ${pcMeasureJ.toTex({ notScientific: true })}$
|
|
98
|
+
3. $Q=${answer.toTex()}$`;
|
|
99
|
+
return {
|
|
100
|
+
instruction,
|
|
101
|
+
answer,
|
|
102
|
+
hint,
|
|
103
|
+
correction,
|
|
104
|
+
pc,
|
|
105
|
+
mass,
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
const getExoType2 = () => {
|
|
109
|
+
const eComb = -(0, randint_1.randint)(60, 91);
|
|
110
|
+
const quantity = (0, randint_1.randint)(2, 9);
|
|
111
|
+
const quantityMeasure = new measure_1.Measure(quantity, 0, AmountOfSubstance_1.AmountOfSubstance.mol);
|
|
112
|
+
const eCombMeasure = new measure_1.Measure(eComb, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.kJ, AmountOfSubstance_1.AmountOfSubstance.mol));
|
|
113
|
+
const eCombMeasureJ = new measure_1.Measure(eComb * 1000, 0, new divideUnit_1.DivideUnit(energyUnit_1.EnergyUnit.J, AmountOfSubstance_1.AmountOfSubstance.mol));
|
|
114
|
+
const instruction = `Un échantillon d'un combustible $X$ de $${quantity}$ moles est brûlé complètement. L'énergie molaire de combustion de ce combustible est $E_{comb} = ${eCombMeasure.toTex({ notScientific: true })}$.
|
|
115
|
+
|
|
116
|
+
Calculez l'énergie totale $(Q)$ libérée lors de la combustion de cet échantillon en joules $(J)$.`;
|
|
117
|
+
const answer = quantityMeasure.times(eCombMeasureJ).toSignificant(6);
|
|
118
|
+
const hint = `Rappel de la formule pour calculer l'énergie totale $(Q)$ libérée lors de la combustion :
|
|
119
|
+
- $Q = n \\times E_{comb}$`;
|
|
120
|
+
const correction = `Appliquer la formule $Q = n \\times E_{comb}$ :
|
|
121
|
+
1. Convertir les $${energyUnit_1.EnergyUnit.kJ.toTex()}$ en $${energyUnit_1.EnergyUnit.J.toTex()}$, $${eCombMeasure.toTex({ notScientific: true })} \\Rightarrow ${eCombMeasureJ.toTex({ notScientific: true })}$
|
|
122
|
+
2. $Q = ${quantityMeasure.toTex({
|
|
123
|
+
notScientific: true,
|
|
124
|
+
})} \\times ${eCombMeasure.toTex({ notScientific: true })}$
|
|
125
|
+
3. $Q=${answer.toTex()}$`;
|
|
126
|
+
return { instruction, answer, hint, correction, eComb, quantity };
|
|
127
|
+
};
|
|
128
|
+
exports.combustionTransferEnergy2 = {
|
|
129
|
+
id: "combustionTransferEnergy2",
|
|
130
|
+
label: "Caclul de l'énergie de transfert de combustion à l'aide du pouvoir calorifique ou de l'énergie de combustion. ",
|
|
131
|
+
levels: ["1reSpé"],
|
|
132
|
+
isSingleStep: true,
|
|
133
|
+
sections: ["Réaction chimique"],
|
|
134
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCombustionTransferEnergy2Question, nb),
|
|
135
|
+
qcmTimer: 60,
|
|
136
|
+
freeTimer: 60,
|
|
137
|
+
getPropositions,
|
|
138
|
+
isAnswerValid,
|
|
139
|
+
subject: "Physique",
|
|
140
|
+
hasHintAndCorrection: true,
|
|
141
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"efficencyOfConverter.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/efficencyOfConverter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAkFF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|