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,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.efficencyOfConverter = 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 wattUnit_1 = require("../../../pc/units/wattUnit");
|
|
9
|
+
const getEfficencyOfConverterQuestion = () => {
|
|
10
|
+
const exo = getExercise();
|
|
11
|
+
const question = {
|
|
12
|
+
answer: exo.answer,
|
|
13
|
+
instruction: exo.instruction,
|
|
14
|
+
hint: exo.hint,
|
|
15
|
+
correction: exo.correction,
|
|
16
|
+
keys: [],
|
|
17
|
+
answerFormat: "tex",
|
|
18
|
+
identifiers: { entry: exo.entry, out: exo.out },
|
|
19
|
+
};
|
|
20
|
+
return question;
|
|
21
|
+
};
|
|
22
|
+
const getPropositions = (n, { answer, entry, out }) => {
|
|
23
|
+
const propositions = [];
|
|
24
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
25
|
+
generatePropositions(entry, out).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value + ""));
|
|
26
|
+
let random;
|
|
27
|
+
while (propositions.length < n) {
|
|
28
|
+
random = (0, randint_1.randint)(+answer - 10, +answer + 20, [+answer]);
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, random + "");
|
|
30
|
+
}
|
|
31
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
32
|
+
};
|
|
33
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
34
|
+
return ans === answer;
|
|
35
|
+
};
|
|
36
|
+
const generatePropositions = (entry, out) => {
|
|
37
|
+
const first = Math.floor((entry * 100) / out) * 100;
|
|
38
|
+
return [first];
|
|
39
|
+
};
|
|
40
|
+
const getExercise = () => {
|
|
41
|
+
const entry = (0, randint_1.randint)(2, 11);
|
|
42
|
+
const entryMeasure = new measure_1.Measure(entry * 100, 0, wattUnit_1.WattUnit.W);
|
|
43
|
+
const out = (0, randint_1.randint)(1, entry) * 100;
|
|
44
|
+
const outMeasure = new measure_1.Measure(out, 0, wattUnit_1.WattUnit.W);
|
|
45
|
+
const instruction = `Un convertisseur reçoit une puissance d'entrée de $${entryMeasure.toTex({ notScientific: true })}$ et fournit une puissance exploitable de $${outMeasure.toTex({
|
|
46
|
+
notScientific: true,
|
|
47
|
+
})}$.
|
|
48
|
+
|
|
49
|
+
Calculez le rendement du convertisseur arrondie au centiéme. Exprimez votre réponse en pourcentage.`;
|
|
50
|
+
const answer = `${Math.floor(out / entry)}`;
|
|
51
|
+
const hint = `Un convertisseur d'énergie a pour rendement, noté $\\eta$, une grandeur sans dimension qui mesure l'efficacité de sa conversion d'énergie.
|
|
52
|
+
|
|
53
|
+
Ce rendement est défini par la formule suivante :
|
|
54
|
+
- $\\eta = \\frac{P_{exploitable}}{P_{entrée}}$`;
|
|
55
|
+
const correction = `Appliquer la formule $\\eta = \\frac{P_{exploitable}}{P_{entrée}}$ :
|
|
56
|
+
|
|
57
|
+
- $\\eta = \\frac{${outMeasure.toTex({
|
|
58
|
+
notScientific: true,
|
|
59
|
+
})}}{${entryMeasure.toTex({
|
|
60
|
+
notScientific: true,
|
|
61
|
+
})}} \\times 100 \\Rightarrow \\eta=${answer}\\%$ `;
|
|
62
|
+
return {
|
|
63
|
+
instruction,
|
|
64
|
+
answer,
|
|
65
|
+
hint,
|
|
66
|
+
correction,
|
|
67
|
+
entry,
|
|
68
|
+
out,
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
exports.efficencyOfConverter = {
|
|
72
|
+
id: "efficencyOfConverter",
|
|
73
|
+
label: "Calcul du rendement d'un convertisseur",
|
|
74
|
+
levels: ["1reSpé"],
|
|
75
|
+
isSingleStep: true,
|
|
76
|
+
sections: ["Électricité"],
|
|
77
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEfficencyOfConverterQuestion, nb),
|
|
78
|
+
qcmTimer: 60,
|
|
79
|
+
freeTimer: 60,
|
|
80
|
+
getPropositions,
|
|
81
|
+
isAnswerValid,
|
|
82
|
+
subject: "Physique",
|
|
83
|
+
hasHintAndCorrection: true,
|
|
84
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
inputPower: number;
|
|
4
|
+
outputPower: number;
|
|
5
|
+
efficiency: number;
|
|
6
|
+
variable: "P_in" | "P_out" | "η";
|
|
7
|
+
};
|
|
8
|
+
export declare const efficiencyCalculation: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=efficiencyCalculation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"efficiencyCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/efficiencyCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC;CAClC,CAAC;AA8IF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.efficiencyCalculation = 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 getEfficiencyCalculationQuestion = () => {
|
|
11
|
+
const inputPower = (0, round_1.round)((0, randfloat_1.randfloat)(100, 1000), 2); // Puissance d'entrée en W
|
|
12
|
+
const outputPower = (0, round_1.round)((0, randfloat_1.randfloat)(50, 900), 2); // Puissance de sortie en W
|
|
13
|
+
const efficiency = (0, round_1.round)(outputPower / inputPower, 2); // Rendement
|
|
14
|
+
const variableIndex = (0, randint_1.randint)(0, 3);
|
|
15
|
+
const variables = ["P_in", "P_out", "η"];
|
|
16
|
+
const variable = variables[variableIndex];
|
|
17
|
+
let questionText, answer;
|
|
18
|
+
switch (variable) {
|
|
19
|
+
case "P_in":
|
|
20
|
+
questionText = `Vous êtes dans un laboratoire et vous mesurez l'efficacité d'un convertisseur. La puissance de sortie est $P_{out} = ${(0, frenchify_1.frenchify)(outputPower)}\\ \\text{W}$ et le rendement est $\\eta = ${(0, frenchify_1.frenchify)(efficiency)}$. Déterminez la puissance d'entrée $P_{in}$ en $\\text{W}$.`;
|
|
21
|
+
answer = (0, round_1.round)(outputPower / efficiency, 2);
|
|
22
|
+
break;
|
|
23
|
+
case "P_out":
|
|
24
|
+
questionText = `Vous êtes dans un laboratoire et vous mesurez l'efficacité d'un convertisseur. La puissance d'entrée est $P_{in} = ${(0, frenchify_1.frenchify)(inputPower)}\\ \\text{W}$ et le rendement est $\\eta = ${(0, frenchify_1.frenchify)(efficiency)}$. Déterminez la puissance de sortie $P_{out}$ en $\\text{W}$.`;
|
|
25
|
+
answer = (0, round_1.round)(inputPower * efficiency, 2);
|
|
26
|
+
break;
|
|
27
|
+
case "η":
|
|
28
|
+
questionText = `Vous êtes dans un laboratoire et vous mesurez l'efficacité d'un convertisseur. La puissance d'entrée est $P_{in} = ${(0, frenchify_1.frenchify)(inputPower)}\\ \\text{W}$ et la puissance de sortie est $P_{out} = ${(0, frenchify_1.frenchify)(outputPower)}\\ \\text{W}$. Déterminez le rendement $\\eta$.`;
|
|
29
|
+
answer = (0, round_1.round)(outputPower / inputPower, 2);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
const hint = `Le rendement d'un convertisseur, noté $\\eta$, est une grandeur sans dimension qui mesure l'efficacité de sa conversion. Il est défini par la relation :
|
|
33
|
+
$$
|
|
34
|
+
\\eta = \\frac{P_{out}}{P_{in}}
|
|
35
|
+
$$
|
|
36
|
+
Réarrangez cette formule pour isoler la variable à trouver.`;
|
|
37
|
+
const correction = `La formule du rendement est :
|
|
38
|
+
$$
|
|
39
|
+
\\eta = \\frac{P_{out}}{P_{in}}
|
|
40
|
+
$$
|
|
41
|
+
|
|
42
|
+
Pour résoudre ce problème, nous devons réorganiser la formule pour isoler la variable inconnue.
|
|
43
|
+
|
|
44
|
+
${variable === "P_in"
|
|
45
|
+
? `$$P_{in} = \\frac{P_{out}}{\\eta} = \\frac{${(0, frenchify_1.frenchify)(outputPower)}}{${(0, frenchify_1.frenchify)(efficiency)}} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{W}$$`
|
|
46
|
+
: variable === "P_out"
|
|
47
|
+
? `$$P_{out} = \\eta \\times P_{in} = ${(0, frenchify_1.frenchify)(efficiency)} \\times ${(0, frenchify_1.frenchify)(inputPower)} = ${(0, frenchify_1.frenchify)(answer)}\\ \\text{W}$$`
|
|
48
|
+
: `$$\\eta = \\frac{P_{out}}{P_{in}} = \\frac{${(0, frenchify_1.frenchify)(outputPower)}}{${(0, frenchify_1.frenchify)(inputPower)}} = ${(0, frenchify_1.frenchify)(answer)}$$`}`;
|
|
49
|
+
const question = {
|
|
50
|
+
answer: answer.toTree().toTex(),
|
|
51
|
+
instruction: questionText,
|
|
52
|
+
hint,
|
|
53
|
+
correction,
|
|
54
|
+
keys: ["timesTenPower"],
|
|
55
|
+
answerFormat: "tex",
|
|
56
|
+
identifiers: {
|
|
57
|
+
inputPower,
|
|
58
|
+
outputPower,
|
|
59
|
+
efficiency,
|
|
60
|
+
variable,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
return question;
|
|
64
|
+
};
|
|
65
|
+
const getPropositions = (n, { answer, inputPower, outputPower, efficiency, variable }) => {
|
|
66
|
+
const propositions = [];
|
|
67
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
68
|
+
const wrongAnswers = [
|
|
69
|
+
variable === "P_in"
|
|
70
|
+
? (0, round_1.round)(outputPower * efficiency, 2)
|
|
71
|
+
: (0, round_1.round)(outputPower / efficiency, 2),
|
|
72
|
+
variable === "P_out"
|
|
73
|
+
? (0, round_1.round)(inputPower / efficiency, 2)
|
|
74
|
+
: (0, round_1.round)(inputPower * efficiency, 2),
|
|
75
|
+
variable === "η"
|
|
76
|
+
? (0, round_1.round)(inputPower / outputPower, 2)
|
|
77
|
+
: (0, round_1.round)(outputPower / inputPower, 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, 1, 2).toTree().toTex());
|
|
84
|
+
}
|
|
85
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
86
|
+
};
|
|
87
|
+
const isAnswerValid = (ans, { answer, outputPower, inputPower, variable }) => {
|
|
88
|
+
let validanswer;
|
|
89
|
+
const efficiency = (0, round_1.round)(outputPower / inputPower, 2);
|
|
90
|
+
switch (variable) {
|
|
91
|
+
case "P_in":
|
|
92
|
+
validanswer = (0, round_1.round)(outputPower / efficiency, 2);
|
|
93
|
+
break;
|
|
94
|
+
case "P_out":
|
|
95
|
+
validanswer = (0, round_1.round)(inputPower * efficiency, 2);
|
|
96
|
+
break;
|
|
97
|
+
case "η":
|
|
98
|
+
validanswer = (0, round_1.round)(outputPower / inputPower, 2);
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
const latexs = [
|
|
102
|
+
...validanswer.toTree().toAllValidTexs(),
|
|
103
|
+
validanswer.toScientific(2).toTex(),
|
|
104
|
+
validanswer.toScientific(1).toTex(),
|
|
105
|
+
validanswer.toScientific(3).toTex(),
|
|
106
|
+
];
|
|
107
|
+
return latexs.includes(ans);
|
|
108
|
+
};
|
|
109
|
+
exports.efficiencyCalculation = {
|
|
110
|
+
id: "efficiencyCalculation",
|
|
111
|
+
label: "Calculer les puissances d'entrée/sortie ou le rendement",
|
|
112
|
+
levels: ["1reSpé"],
|
|
113
|
+
isSingleStep: true,
|
|
114
|
+
sections: ["Énergie"],
|
|
115
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEfficiencyCalculationQuestion, nb),
|
|
116
|
+
qcmTimer: 60,
|
|
117
|
+
freeTimer: 60,
|
|
118
|
+
getPropositions,
|
|
119
|
+
isAnswerValid,
|
|
120
|
+
subject: "Physique",
|
|
121
|
+
hasHintAndCorrection: true,
|
|
122
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
substance: string;
|
|
4
|
+
mass: number;
|
|
5
|
+
latentHeat: number;
|
|
6
|
+
energy: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const energyTransfer: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=energyTransfer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"energyTransfer.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/energyTransfer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAiEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.energyTransfer = void 0;
|
|
4
|
+
const frenchify_1 = require("../../../math/utils/latex/frenchify");
|
|
5
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
6
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
7
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
8
|
+
const round_1 = require("../../../math/utils/round");
|
|
9
|
+
const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
|
|
10
|
+
const substances = [
|
|
11
|
+
{ name: "eau", latentHeat: 334 }, // kJ/kg for melting ice
|
|
12
|
+
{ name: "fer", latentHeat: 276 }, // kJ/kg for melting iron
|
|
13
|
+
{ name: "aluminium", latentHeat: 397 }, // kJ/kg for melting aluminium
|
|
14
|
+
{ name: "or", latentHeat: 64 }, // kJ/kg for melting gold
|
|
15
|
+
{ name: "argent", latentHeat: 105 }, // kJ/kg for melting silver
|
|
16
|
+
{ name: "plomb", latentHeat: 24 }, // kJ/kg for melting lead
|
|
17
|
+
{ name: "cuivre", latentHeat: 207 }, // kJ/kg for melting copper
|
|
18
|
+
{ name: "zinc", latentHeat: 112 }, // kJ/kg for melting zinc
|
|
19
|
+
{ name: "étain", latentHeat: 60 }, // kJ/kg for melting tin
|
|
20
|
+
{ name: "nickel", latentHeat: 297 }, // kJ/kg for melting nickel
|
|
21
|
+
];
|
|
22
|
+
const getEnergyTransferQuestion = () => {
|
|
23
|
+
const substance = substances[Math.floor(Math.random() * substances.length)];
|
|
24
|
+
const mass = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 10), 2); // Mass in kilograms
|
|
25
|
+
const latentHeat = substance.latentHeat; // Latent heat in kJ/kg
|
|
26
|
+
const energy = (0, round_1.round)(mass * latentHeat, 2);
|
|
27
|
+
const instruction = `Un échantillon de $${(0, frenchify_1.frenchify)(mass)}\\ kg$ ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(substance.name) ? "d'" : "de "}${substance.name} subit un changement d'état. La chaleur latente ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(substance.name) ? "d'" : "de "}${substance.name} est de $${latentHeat}\\ kJ/kg$.
|
|
28
|
+
Calculer l'énergie transférée lors du changement d'état en $\\ kJ$`;
|
|
29
|
+
const question = {
|
|
30
|
+
answer: energy.toTree().toTex(),
|
|
31
|
+
instruction,
|
|
32
|
+
keys: ["kJ"],
|
|
33
|
+
answerFormat: "tex",
|
|
34
|
+
identifiers: { substance: substance.name, mass, latentHeat, energy },
|
|
35
|
+
};
|
|
36
|
+
return question;
|
|
37
|
+
};
|
|
38
|
+
const getPropositions = (n, { answer, substance, mass, latentHeat, energy }) => {
|
|
39
|
+
const propositions = [];
|
|
40
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
41
|
+
while (propositions.length < n) {
|
|
42
|
+
const wrongEnergy = (0, round_1.round)(energy + (0, randfloat_1.randfloat)(-50, 50), 2);
|
|
43
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongEnergy.toTree().toTex());
|
|
44
|
+
}
|
|
45
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
46
|
+
};
|
|
47
|
+
const isAnswerValid = (ans, { answer, energy }) => {
|
|
48
|
+
const validanswer1 = `${energy}\\kJ`;
|
|
49
|
+
const validanswer2 = energy.toTree().toAllValidTexs();
|
|
50
|
+
let latexs = [];
|
|
51
|
+
latexs.push(validanswer1, ...validanswer2);
|
|
52
|
+
console.log(latexs);
|
|
53
|
+
return latexs.includes(ans);
|
|
54
|
+
};
|
|
55
|
+
exports.energyTransfer = {
|
|
56
|
+
id: "energyTransfer",
|
|
57
|
+
label: "Calculer l'énergie transférée lors d'un changement d'état",
|
|
58
|
+
levels: ["2nde"],
|
|
59
|
+
isSingleStep: true,
|
|
60
|
+
sections: ["Constitution et transformations de la matière"],
|
|
61
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getEnergyTransferQuestion, nb),
|
|
62
|
+
qcmTimer: 60,
|
|
63
|
+
freeTimer: 60,
|
|
64
|
+
getPropositions,
|
|
65
|
+
isAnswerValid,
|
|
66
|
+
subject: "Physique",
|
|
67
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./energyTransfer";
|
|
2
|
+
export * from "./kineticEnergyOrMassOrSpeed";
|
|
3
|
+
export * from "./efficencyOfConverter";
|
|
4
|
+
export * from "./combustionTransferEnergy";
|
|
5
|
+
export * from "./calorificValue";
|
|
6
|
+
export * from "./combustionTransferEnergy2";
|
|
7
|
+
export * from "./thermalEnergyTransferCalculation";
|
|
8
|
+
export * from "./efficiencyCalculation";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./energyTransfer"), exports);
|
|
18
|
+
__exportStar(require("./kineticEnergyOrMassOrSpeed"), exports);
|
|
19
|
+
__exportStar(require("./efficencyOfConverter"), exports);
|
|
20
|
+
__exportStar(require("./combustionTransferEnergy"), exports);
|
|
21
|
+
__exportStar(require("./calorificValue"), exports);
|
|
22
|
+
__exportStar(require("./combustionTransferEnergy2"), exports);
|
|
23
|
+
__exportStar(require("./thermalEnergyTransferCalculation"), exports);
|
|
24
|
+
__exportStar(require("./efficiencyCalculation"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
isAsking: string;
|
|
4
|
+
mass: number;
|
|
5
|
+
velocity: number;
|
|
6
|
+
kineticEnergy: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const kineticEnergyOrMassOrSpeed: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=kineticEnergyOrMassOrSpeed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kineticEnergyOrMassOrSpeed.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/kineticEnergyOrMassOrSpeed.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAuNF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.kineticEnergyOrMassOrSpeed = 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 distanceUnits_1 = require("../../../pc/units/distanceUnits");
|
|
12
|
+
const divideUnit_1 = require("../../../pc/units/divideUnit");
|
|
13
|
+
const energyUnit_1 = require("../../../pc/units/energyUnit");
|
|
14
|
+
const massUnits_1 = require("../../../pc/units/massUnits");
|
|
15
|
+
const timeUnits_1 = require("../../../pc/units/timeUnits");
|
|
16
|
+
const random_1 = require("../../../utils/random");
|
|
17
|
+
const shuffle_1 = require("../../../utils/shuffle");
|
|
18
|
+
const speedUnit = new divideUnit_1.DivideUnit(distanceUnits_1.DistanceUnit.m, timeUnits_1.TimeUnit.s);
|
|
19
|
+
const getKineticEnergyOrMassOrSpeedQuestion = () => {
|
|
20
|
+
const exercise = getExericse();
|
|
21
|
+
const question = {
|
|
22
|
+
instruction: exercise.instruction,
|
|
23
|
+
answer: exercise.answer,
|
|
24
|
+
hint: exercise.hint,
|
|
25
|
+
correction: exercise.correction,
|
|
26
|
+
keys: [],
|
|
27
|
+
answerFormat: "tex",
|
|
28
|
+
identifiers: {
|
|
29
|
+
isAsking: exercise.isAsking,
|
|
30
|
+
mass: exercise.mass,
|
|
31
|
+
velocity: exercise.velocity,
|
|
32
|
+
kineticEnergy: exercise.kineticEnergy,
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
return question;
|
|
36
|
+
};
|
|
37
|
+
const getPropositions = (n, { answer, isAsking, mass, velocity, kineticEnergy }) => {
|
|
38
|
+
const propositions = [];
|
|
39
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
40
|
+
const nbAnswer = getAnswer(isAsking, mass, velocity, kineticEnergy);
|
|
41
|
+
while (propositions.length < n) {
|
|
42
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, frenchify_1.frenchify)(Number.isInteger(nbAnswer)
|
|
43
|
+
? (0, randint_1.randint)(nbAnswer - 10, nbAnswer + 11, [nbAnswer])
|
|
44
|
+
: (0, randfloat_1.randfloat)(nbAnswer - 10, nbAnswer + 11, 2, [nbAnswer])) + "");
|
|
45
|
+
}
|
|
46
|
+
return (0, shuffle_1.shuffle)(propositions);
|
|
47
|
+
};
|
|
48
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
49
|
+
return ans === answer;
|
|
50
|
+
};
|
|
51
|
+
const getExericse = () => {
|
|
52
|
+
const mass = (0, randint_1.randint)(9, 16) * 100;
|
|
53
|
+
const massMeasure = new measure_1.Measure(mass, 0, massUnits_1.MassUnit.kg);
|
|
54
|
+
const velocity = Math.floor(Math.random() * 20 + 10);
|
|
55
|
+
const velocityMeasure = new measure_1.Measure(velocity, 0, speedUnit);
|
|
56
|
+
const kineticEnergy = (0, round_1.round)((0.5 * mass * velocity ** 2) / 1000, 2);
|
|
57
|
+
const kineticEnergyMeasure = new measure_1.Measure(kineticEnergy, 0, energyUnit_1.EnergyUnit.kJ);
|
|
58
|
+
const isAsking = (0, random_1.random)(["la masse", "l'énergie cinétique", "la vitesse"]);
|
|
59
|
+
const hint = `L'énergie cinétique $(E_c)$ d'un objet en mouvement est donnée par la formule, $E_c=\\frac{1}{2}m \\times v^2$ :
|
|
60
|
+
- $m$ est la masse de l'objet en $(${massUnits_1.MassUnit.kg.toTex()})$
|
|
61
|
+
- $v$ est la vitesse de l'objet en $(${new divideUnit_1.DivideUnit(distanceUnits_1.DistanceUnit.m, timeUnits_1.TimeUnit.s).toTex()})$
|
|
62
|
+
- $E_c$ est l'énergie cinétique de l'objet en $(${energyUnit_1.EnergyUnit.J.toTex()})$`;
|
|
63
|
+
const correction = getCorrection(isAsking, kineticEnergyMeasure, massMeasure, velocityMeasure);
|
|
64
|
+
const instruction = getInstruction(isAsking, massMeasure, velocityMeasure, kineticEnergyMeasure);
|
|
65
|
+
const answer = (0, frenchify_1.frenchify)((0, round_1.round)(getAnswer(isAsking, mass, velocity, kineticEnergy), 2));
|
|
66
|
+
return {
|
|
67
|
+
instruction,
|
|
68
|
+
answer,
|
|
69
|
+
hint,
|
|
70
|
+
correction,
|
|
71
|
+
mass,
|
|
72
|
+
velocity,
|
|
73
|
+
kineticEnergy,
|
|
74
|
+
isAsking,
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
const getAnswer = (isAsking, mass, velocity, kineticEnergy) => {
|
|
78
|
+
switch (isAsking) {
|
|
79
|
+
case "l'énergie cinétique":
|
|
80
|
+
return (0.5 * mass * velocity ** 2) / 1000;
|
|
81
|
+
case "la masse":
|
|
82
|
+
return (kineticEnergy * 1000 * 2) / velocity ** 2;
|
|
83
|
+
case "la vitesse":
|
|
84
|
+
return Math.sqrt((kineticEnergy * 1000 * 2) / mass);
|
|
85
|
+
}
|
|
86
|
+
return 0;
|
|
87
|
+
};
|
|
88
|
+
const getInstruction = (isAsking, massMeasure, velocityMeasure, kineticEnergyMeasure) => {
|
|
89
|
+
switch (isAsking) {
|
|
90
|
+
case "l'énergie cinétique":
|
|
91
|
+
return `Une voiture ayant une masse de $${massMeasure.toTex({
|
|
92
|
+
notScientific: true,
|
|
93
|
+
})}$ qui se déplace le long d'une route. La voiture accélère et atteint une vitesse de $${velocityMeasure.toTex({ notScientific: true })}$.
|
|
94
|
+
$\\\\$Calculer l'énergie cinétique (en $${energyUnit_1.EnergyUnit.kJ.toTex()}$) de la voiture lorsqu'elle atteint cette vitesse.`;
|
|
95
|
+
case "la masse":
|
|
96
|
+
return `Une voiture ayant une énergie cinétique de $${kineticEnergyMeasure.toTex({ notScientific: true })}$ qui se déplace le long d'une route. La voiture accélère et atteint une vitesse de $${velocityMeasure.toTex({ notScientific: true })}$.
|
|
97
|
+
$\\\\$Calculer la masse (en $${massUnits_1.MassUnit.kg.toTex()}$) de la voiture lorsqu'elle atteint cette vitesse.`;
|
|
98
|
+
case "la vitesse":
|
|
99
|
+
return `Une voiture ayant une masse de $${massMeasure.toTex({
|
|
100
|
+
notScientific: true,
|
|
101
|
+
})}$ qui se déplace le long d'une route. L'énergie cinétique de la voiture est de $${kineticEnergyMeasure.toTex({ notScientific: true })}$.
|
|
102
|
+
$\\\\$Calculer la vitesse (en $${speedUnit.toTex()}$) de la voiture.`;
|
|
103
|
+
}
|
|
104
|
+
return "";
|
|
105
|
+
};
|
|
106
|
+
const getCorrection = (isAsking, kineticEnergyMeasure, massMeasure, velocityMeasure) => {
|
|
107
|
+
const kineticEnergyJ = kineticEnergyMeasure.convert("J");
|
|
108
|
+
switch (isAsking) {
|
|
109
|
+
case "l'énergie cinétique":
|
|
110
|
+
return `Utiliser la formule de l'énergie cinétique, $E_c=\\frac{1}{2}m \\times v^2$:
|
|
111
|
+
1. $E_c=\\frac{1}{2} ${massMeasure.toTex({
|
|
112
|
+
notScientific: true,
|
|
113
|
+
hideUnit: true,
|
|
114
|
+
})} \\times ${velocityMeasure.toTex({
|
|
115
|
+
hideUnit: true,
|
|
116
|
+
notScientific: true,
|
|
117
|
+
})}^2\\ \\Rightarrow E_c=${kineticEnergyJ.toTex({
|
|
118
|
+
notScientific: true,
|
|
119
|
+
})}$
|
|
120
|
+
2. Convertir les $${energyUnit_1.EnergyUnit.J.toTex()}$ en $${energyUnit_1.EnergyUnit.kJ.toTex()}$, $E_c=\\frac{${kineticEnergyJ.toTex({
|
|
121
|
+
notScientific: true,
|
|
122
|
+
})}}{1000} \\Rightarrow E_c=${kineticEnergyMeasure.toTex({
|
|
123
|
+
notScientific: true,
|
|
124
|
+
})}$`;
|
|
125
|
+
case "la masse":
|
|
126
|
+
return `Utiliser la formule de l'énergie cinétique, $E_c=\\frac{1}{2}m \\times v^2$:
|
|
127
|
+
1. Convertir les $${energyUnit_1.EnergyUnit.kJ.toTex()}$ en $${energyUnit_1.EnergyUnit.J.toTex()}$, $${kineticEnergyMeasure.toTex({
|
|
128
|
+
notScientific: true,
|
|
129
|
+
})}\\Rightarrow ${kineticEnergyJ.toTex({ notScientific: true })}$
|
|
130
|
+
2. $m=\\frac{2E_c}{v^2} \\Rightarrow m=\\frac{2 \\times ${kineticEnergyJ.toTex({
|
|
131
|
+
hideUnit: true,
|
|
132
|
+
notScientific: true,
|
|
133
|
+
})}}{${velocityMeasure.toTex({
|
|
134
|
+
notScientific: true,
|
|
135
|
+
hideUnit: true,
|
|
136
|
+
})}^2}\\ \\Rightarrow m=${massMeasure.toTex({
|
|
137
|
+
notScientific: true,
|
|
138
|
+
})}$`;
|
|
139
|
+
case "la vitesse":
|
|
140
|
+
return `Utiliser la formule de l'énergie cinétique, $E_c=\\frac{1}{2}m \\times v^2$:
|
|
141
|
+
1. Convertir les $${energyUnit_1.EnergyUnit.kJ.toTex()}$ en $${energyUnit_1.EnergyUnit.J.toTex()}$, $${kineticEnergyMeasure.toTex({
|
|
142
|
+
notScientific: true,
|
|
143
|
+
})}\\Rightarrow ${kineticEnergyJ.toTex({ notScientific: true })}$
|
|
144
|
+
2. $v=\\sqrt{\\frac{2E_c}{m}} \\Rightarrow v=\\sqrt{\\frac{2 \\times ${kineticEnergyJ.toTex({
|
|
145
|
+
hideUnit: true,
|
|
146
|
+
notScientific: true,
|
|
147
|
+
})}}{${massMeasure.toTex({
|
|
148
|
+
hideUnit: true,
|
|
149
|
+
notScientific: true,
|
|
150
|
+
})}}}\\ \\Rightarrow v=${velocityMeasure.toTex({
|
|
151
|
+
notScientific: true,
|
|
152
|
+
})}$`;
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
exports.kineticEnergyOrMassOrSpeed = {
|
|
156
|
+
id: "kineticEnergyOrMassOrSpeed",
|
|
157
|
+
label: "Calculer l'énergie cinétique",
|
|
158
|
+
levels: ["4ème", "3ème", "2nde", "1reSpé"],
|
|
159
|
+
sections: ["Mécanique"],
|
|
160
|
+
subject: "Physique",
|
|
161
|
+
isSingleStep: true,
|
|
162
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getKineticEnergyOrMassOrSpeedQuestion, nb),
|
|
163
|
+
qcmTimer: 60,
|
|
164
|
+
freeTimer: 60,
|
|
165
|
+
getPropositions,
|
|
166
|
+
isAnswerValid,
|
|
167
|
+
hasHintAndCorrection: true,
|
|
168
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
mass: number;
|
|
4
|
+
specificHeat: number;
|
|
5
|
+
initialTemp: number;
|
|
6
|
+
finalTemp: number;
|
|
7
|
+
variable: "E_th" | "m" | "c" | "deltaT";
|
|
8
|
+
};
|
|
9
|
+
export declare const thermalEnergyTransferCalculation: Exercise<Identifiers>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=thermalEnergyTransferCalculation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"thermalEnergyTransferCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/energy/thermalEnergyTransferCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,GAAG,GAAG,GAAG,GAAG,GAAG,QAAQ,CAAC;CACzC,CAAC;AA4NF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAclE,CAAC"}
|