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,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MotionReferenceExercise = 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 coinFlip_1 = require("../../../utils/coinFlip");
|
|
8
|
+
const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
|
|
9
|
+
const situations = [
|
|
10
|
+
{
|
|
11
|
+
object1: "avion de chasse",
|
|
12
|
+
object2: "ravitailleur",
|
|
13
|
+
context: "Vous observez un ravitaillement en vol. Un avion de chasse et un ravitailleur maintiennent une position relative constante pendant le ravitaillement.",
|
|
14
|
+
gender1: "masculin",
|
|
15
|
+
gender2: "masculin",
|
|
16
|
+
hints: {
|
|
17
|
+
"à l'autre": "Les deux avions maintiennent une position relative constante.",
|
|
18
|
+
"au sol": "Les deux avions se déplacent ensemble dans le ciel.",
|
|
19
|
+
},
|
|
20
|
+
corrections: {
|
|
21
|
+
"à l'autre": "Les avions ne sont pas en mouvement l'un par rapport à l'autre car ils maintiennent une position relative constante pendant le ravitaillement. Cela signifie que leur vitesse et direction sont les mêmes.",
|
|
22
|
+
"au sol": "Les avions sont en mouvement par rapport au sol, car ils volent dans le ciel. Même s'ils restent proches l'un de l'autre, ils se déplacent tous les deux par rapport à la Terre.",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
object1: "passager",
|
|
27
|
+
object2: "train",
|
|
28
|
+
context: "Un passager est assis à l'intérieur d'un train qui roule à une vitesse constante sur une ligne droite.",
|
|
29
|
+
gender1: "masculin",
|
|
30
|
+
gender2: "masculin",
|
|
31
|
+
hints: {
|
|
32
|
+
"à l'autre": "Le passager est à l'intérieur du train en mouvement.",
|
|
33
|
+
"au sol": "Le train se déplace sur les rails.",
|
|
34
|
+
},
|
|
35
|
+
corrections: {
|
|
36
|
+
"à l'autre": "Le passager n'est pas en mouvement par rapport au train car il est assis à l'intérieur du train en mouvement. Pour un observateur à l'intérieur du train, le passager reste immobile.",
|
|
37
|
+
"au sol": "Le train est en mouvement par rapport au sol car il roule sur les rails. Pour un observateur extérieur au train, il est évident que le train se déplace.",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
object1: "conducteur",
|
|
42
|
+
object2: "voiture",
|
|
43
|
+
context: "Un conducteur est au volant d'une voiture qui circule sur une autoroute.",
|
|
44
|
+
gender1: "masculin",
|
|
45
|
+
gender2: "féminin",
|
|
46
|
+
hints: {
|
|
47
|
+
"à l'autre": "Le conducteur est au volant de la voiture en mouvement.",
|
|
48
|
+
"au sol": "La voiture roule sur l'autoroute.",
|
|
49
|
+
},
|
|
50
|
+
corrections: {
|
|
51
|
+
"à l'autre": "Le conducteur n'est pas en mouvement par rapport à la voiture car il est au volant de celle-ci. Pour lui, il reste à la même place dans la voiture, même si celle-ci se déplace.",
|
|
52
|
+
"au sol": "La voiture est en mouvement par rapport au sol car elle roule sur l'autoroute. Cela signifie que la voiture change de position par rapport à la route et au paysage environnant.",
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
object1: "enfant",
|
|
57
|
+
object2: "manège",
|
|
58
|
+
context: "Un enfant est assis dans un manège qui tourne à une vitesse constante.",
|
|
59
|
+
gender1: "masculin",
|
|
60
|
+
gender2: "masculin",
|
|
61
|
+
hints: {
|
|
62
|
+
"à l'autre": "L'enfant est assis dans le manège en mouvement.",
|
|
63
|
+
"au sol": "Le manège tourne sur place.",
|
|
64
|
+
},
|
|
65
|
+
corrections: {
|
|
66
|
+
"à l'autre": "L'enfant n'est pas en mouvement par rapport au manège car il est assis dedans. Pour un observateur sur le manège, l'enfant reste à la même place.",
|
|
67
|
+
"au sol": "Le manège est en mouvement par rapport au sol car il tourne sur place. Même si l'enfant reste assis au même endroit dans le manège, le manège tout entier tourne par rapport au sol.",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
object1: "Terre",
|
|
72
|
+
object2: "Lune",
|
|
73
|
+
context: "Vous observez la Terre et la Lune depuis l'espace. La Terre tourne sur elle-même et autour du Soleil, tandis que la Lune tourne autour de la Terre.",
|
|
74
|
+
gender1: "féminin",
|
|
75
|
+
gender2: "féminin",
|
|
76
|
+
hints: {
|
|
77
|
+
"à l'autre": "La Lune tourne autour de la Terre.",
|
|
78
|
+
"au sol": "La Terre et la Lune sont en mouvement dans l'espace.",
|
|
79
|
+
},
|
|
80
|
+
corrections: {
|
|
81
|
+
"à l'autre": "La Lune est en mouvement par rapport à la Terre car elle tourne autour de celle-ci. Pour un observateur sur la Terre, la position de la Lune change continuellement dans le ciel.",
|
|
82
|
+
"au sol": "La Terre et la Lune sont en mouvement par rapport au sol, car elles se déplacent dans l'espace. La Terre tourne sur elle-même et autour du Soleil, et la Lune tourne autour de la Terre.",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
const references = ["à l'autre", "au sol"];
|
|
87
|
+
const determineCorrectAnswer = (situation, reference) => {
|
|
88
|
+
if (reference === "à l'autre") {
|
|
89
|
+
if ((situation.object1 === "Terre" && situation.object2 === "Lune") ||
|
|
90
|
+
(situation.object1 === "Lune" && situation.object2 === "Terre")) {
|
|
91
|
+
return "Oui";
|
|
92
|
+
}
|
|
93
|
+
return "Non";
|
|
94
|
+
}
|
|
95
|
+
else if (reference === "au sol") {
|
|
96
|
+
if (situation.object1 === "Terre" && situation.object2 === "Lune") {
|
|
97
|
+
return "Non";
|
|
98
|
+
}
|
|
99
|
+
else if (situation.object1 === "Lune" && situation.object2 === "Terre") {
|
|
100
|
+
return "Oui";
|
|
101
|
+
}
|
|
102
|
+
return "Oui";
|
|
103
|
+
}
|
|
104
|
+
return "On ne peut pas savoir";
|
|
105
|
+
};
|
|
106
|
+
const getMotionReferenceQuestion = () => {
|
|
107
|
+
const situationIndex = (0, randint_1.randint)(0, situations.length);
|
|
108
|
+
const situation = situations[situationIndex];
|
|
109
|
+
const referenceIndex = (0, randint_1.randint)(0, references.length);
|
|
110
|
+
const reference = references[referenceIndex];
|
|
111
|
+
const objectToCheckIndex = (0, coinFlip_1.coinFlip)();
|
|
112
|
+
const objectToCheck = objectToCheckIndex
|
|
113
|
+
? situation.object1
|
|
114
|
+
: situation.object2;
|
|
115
|
+
const otherObject = situation.object1 === objectToCheck ? situation.object2 : situation.object1;
|
|
116
|
+
const referenceText = reference === "à l'autre" ? otherObject : "sol";
|
|
117
|
+
const isMasculine = objectToCheckIndex
|
|
118
|
+
? situation.gender1 === "masculin"
|
|
119
|
+
: situation.gender2 === "masculin";
|
|
120
|
+
const genderPronoun = isMasculine ? "il" : "elle";
|
|
121
|
+
const instruction = `Considérez la situation suivante :\n
|
|
122
|
+
${situation.context}\n
|
|
123
|
+
${(0, requiresApostropheBefore_1.requiresApostropheBefore)(objectToCheck) ? "L'" : "Le "}${objectToCheck} est-${genderPronoun} en mouvement par rapport ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(referenceText) ? "à l'" : "au "}${referenceText} ?`;
|
|
124
|
+
const correctAnswer = determineCorrectAnswer(situation, reference);
|
|
125
|
+
const hint = situation.hints[reference];
|
|
126
|
+
const correction = situation.corrections[reference];
|
|
127
|
+
const question = {
|
|
128
|
+
answer: correctAnswer,
|
|
129
|
+
instruction,
|
|
130
|
+
hint,
|
|
131
|
+
correction,
|
|
132
|
+
keys: [],
|
|
133
|
+
answerFormat: "raw",
|
|
134
|
+
identifiers: {
|
|
135
|
+
object1: situation.object1,
|
|
136
|
+
object2: situation.object2,
|
|
137
|
+
reference,
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
return question;
|
|
141
|
+
};
|
|
142
|
+
const getPropositions = (n, { answer }) => {
|
|
143
|
+
const propositions = [];
|
|
144
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
145
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Oui", "raw");
|
|
146
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Non", "raw");
|
|
147
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir", "raw");
|
|
148
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
149
|
+
};
|
|
150
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
151
|
+
return ans === answer;
|
|
152
|
+
};
|
|
153
|
+
exports.MotionReferenceExercise = {
|
|
154
|
+
id: "motionReference",
|
|
155
|
+
label: "Déterminer le mouvement relatif entre deux objets",
|
|
156
|
+
levels: ["2nde"],
|
|
157
|
+
isSingleStep: true,
|
|
158
|
+
sections: ["Mécanique"],
|
|
159
|
+
answerType: "QCU",
|
|
160
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMotionReferenceQuestion, nb, 10),
|
|
161
|
+
qcmTimer: 60,
|
|
162
|
+
freeTimer: 60,
|
|
163
|
+
getPropositions,
|
|
164
|
+
isAnswerValid,
|
|
165
|
+
subject: "Physique",
|
|
166
|
+
maxAllowedQuestions: 10,
|
|
167
|
+
hasHintAndCorrection: true,
|
|
168
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAmFtB,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeOfAcceleration = 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 getTypeOfAccelerationQuestion = () => {
|
|
10
|
+
const exo = generateExo();
|
|
11
|
+
const question = {
|
|
12
|
+
answer: exo.answer,
|
|
13
|
+
instruction: exo.instruction,
|
|
14
|
+
commands: exo.ggb.object.commands,
|
|
15
|
+
options: exo.ggb.object.getOptions(),
|
|
16
|
+
coords: exo.ggb.coords,
|
|
17
|
+
keys: [],
|
|
18
|
+
answerFormat: "raw",
|
|
19
|
+
identifiers: {},
|
|
20
|
+
};
|
|
21
|
+
return question;
|
|
22
|
+
};
|
|
23
|
+
const getPropositions = (n, { answer }) => {
|
|
24
|
+
const propositions = [];
|
|
25
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
26
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Mouvement accéléré", "raw");
|
|
27
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Mouvement ralenti", "raw");
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Mouvement constant", "raw");
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir", "raw");
|
|
30
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
31
|
+
};
|
|
32
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
33
|
+
return ans === answer;
|
|
34
|
+
};
|
|
35
|
+
const generateExo = () => {
|
|
36
|
+
const typeOfAcceleration = (0, random_1.random)([
|
|
37
|
+
"Mouvement accéléré",
|
|
38
|
+
"Mouvement ralenti",
|
|
39
|
+
"Mouvement constant",
|
|
40
|
+
]);
|
|
41
|
+
const ggb = generateGgb(typeOfAcceleration);
|
|
42
|
+
const instruction = `D'après le graphique ci-dessous qui représente la position d'un objet en fonction du temps,
|
|
43
|
+
|
|
44
|
+
déterminez si l'objet est en mouvement accéléré, en mouvement ralenti ou en mouvement constant.`;
|
|
45
|
+
return {
|
|
46
|
+
instruction,
|
|
47
|
+
answer: typeOfAcceleration,
|
|
48
|
+
ggb,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
const generateGgb = (typeOfAcceleration) => {
|
|
52
|
+
const points = getPoints(typeOfAcceleration);
|
|
53
|
+
return {
|
|
54
|
+
object: new geogebraConstructor_1.GeogebraConstructor(points.points, {
|
|
55
|
+
hideAxes: true,
|
|
56
|
+
hideGrid: true,
|
|
57
|
+
}),
|
|
58
|
+
coords: points.coords,
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
const getPoints = (typeOfAcceleration) => {
|
|
62
|
+
const points = [];
|
|
63
|
+
let coords = [];
|
|
64
|
+
let n = 0;
|
|
65
|
+
let x = 0;
|
|
66
|
+
let step = (0, randint_1.randint)(3, 14);
|
|
67
|
+
let variation = 1;
|
|
68
|
+
if (typeOfAcceleration === "Mouvement accéléré")
|
|
69
|
+
variation = 1.3;
|
|
70
|
+
if (typeOfAcceleration === "Mouvement ralenti") {
|
|
71
|
+
step = (0, randint_1.randint)(10, 21);
|
|
72
|
+
variation = 0.8;
|
|
73
|
+
}
|
|
74
|
+
while (n < 10) {
|
|
75
|
+
points.push(`Point({${x},4})`);
|
|
76
|
+
x = x + step;
|
|
77
|
+
step = step * variation;
|
|
78
|
+
n++;
|
|
79
|
+
}
|
|
80
|
+
coords = [-2, x + 5, -2, 20];
|
|
81
|
+
return { points, coords };
|
|
82
|
+
};
|
|
83
|
+
exports.typeOfAcceleration = {
|
|
84
|
+
id: "typeOfAcceleration",
|
|
85
|
+
label: "Déterminer le type d'accélération du mouvement d'un objet.",
|
|
86
|
+
levels: ["2nde"],
|
|
87
|
+
isSingleStep: true,
|
|
88
|
+
sections: ["Mécanique"],
|
|
89
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTypeOfAccelerationQuestion, nb),
|
|
90
|
+
qcmTimer: 60,
|
|
91
|
+
freeTimer: 60,
|
|
92
|
+
getPropositions,
|
|
93
|
+
isAnswerValid,
|
|
94
|
+
hasGeogebra: true,
|
|
95
|
+
answerType: "QCM",
|
|
96
|
+
subject: "Physique",
|
|
97
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeOfMovement.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfMovement.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAkHtB,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeOfMovement = 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 affine_1 = require("../../../math/polynomials/affine");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const random_1 = require("../../../utils/random");
|
|
10
|
+
const getTypeOfMovementQuestion = () => {
|
|
11
|
+
const exo = generateExercise();
|
|
12
|
+
const ggb = exo.ggb;
|
|
13
|
+
const question = {
|
|
14
|
+
answer: exo.answer,
|
|
15
|
+
instruction: exo.instruction,
|
|
16
|
+
commands: ggb.commands,
|
|
17
|
+
coords: exo.coords,
|
|
18
|
+
options: ggb.getOptions(),
|
|
19
|
+
keys: [],
|
|
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, "Rectiligne", "raw");
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Circulaire", "raw");
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Curviligne", "raw");
|
|
31
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir.", "raw");
|
|
32
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
33
|
+
};
|
|
34
|
+
const generateExercise = () => {
|
|
35
|
+
const movementType = (0, random_1.random)(["Rectiligne", "Circulaire", "Curviligne"]);
|
|
36
|
+
const ggb = getGgb(movementType);
|
|
37
|
+
const instruction = `Soit le graphique ci-dessous, représentant la position d'un objet en fonction du temps. \n \\
|
|
38
|
+
Déterminer le type de mouvement de l'objet.`;
|
|
39
|
+
return {
|
|
40
|
+
instruction,
|
|
41
|
+
answer: movementType,
|
|
42
|
+
movementType,
|
|
43
|
+
ggb: ggb.ggb,
|
|
44
|
+
coords: ggb.coords,
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
const getGgb = (movementType) => {
|
|
48
|
+
let commands = [];
|
|
49
|
+
let coords = [];
|
|
50
|
+
let point1;
|
|
51
|
+
let point2;
|
|
52
|
+
switch (movementType) {
|
|
53
|
+
case "Circulaire":
|
|
54
|
+
const a = (0, randint_1.randint)(1, 5);
|
|
55
|
+
const b = (0, randint_1.randint)(6, 9);
|
|
56
|
+
commands = [
|
|
57
|
+
`Semicircle((${a},4),(${b},8))`,
|
|
58
|
+
`Point({${a},4})`,
|
|
59
|
+
`Point({${b},8})`,
|
|
60
|
+
`Point({${a},8})`,
|
|
61
|
+
];
|
|
62
|
+
coords = [-2, 10, -2, 10];
|
|
63
|
+
break;
|
|
64
|
+
case "Rectiligne":
|
|
65
|
+
const affine = affine_1.AffineConstructor.random({ min: 1, max: 4 }, { min: 1, max: 4 });
|
|
66
|
+
point1 = `(2,${affine.calculate(2)})`;
|
|
67
|
+
point2 = `(8,${affine.calculate(8)})`;
|
|
68
|
+
commands = [`Segment(${point1},${point2})`].concat(getPoints(movementType, { affine }));
|
|
69
|
+
coords = [-2, 10, -2, affine.calculate(8) + 5];
|
|
70
|
+
break;
|
|
71
|
+
case "Curviligne":
|
|
72
|
+
const random = (0, randint_1.randint)(10, 21);
|
|
73
|
+
const bRand = (0, randint_1.randint)(1, 5);
|
|
74
|
+
commands = [`Function(e^sin(x)+${bRand},0,${random})`].concat(getPoints(movementType, { bRand: bRand }));
|
|
75
|
+
coords = [-2, 10, -2, 10];
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
ggb: new geogebraConstructor_1.GeogebraConstructor(commands, {}),
|
|
80
|
+
coords,
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
const getPoints = (movementType, options) => {
|
|
84
|
+
const commands = [];
|
|
85
|
+
switch (movementType) {
|
|
86
|
+
case "Rectiligne":
|
|
87
|
+
for (let x = 3; x < 8; x++) {
|
|
88
|
+
commands.push(`Point({${x},${options.affine.calculate(x)}})`);
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
case "Curviligne":
|
|
92
|
+
for (let x = 1; x < 9; x++) {
|
|
93
|
+
commands.push(`Point({${x},${Math.exp(Math.sin(x)) + options.bRand}})`);
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
return commands;
|
|
98
|
+
};
|
|
99
|
+
exports.typeOfMovement = {
|
|
100
|
+
id: "typeOfMovement",
|
|
101
|
+
label: "Déterminer le type de mouvement",
|
|
102
|
+
levels: ["2nde"],
|
|
103
|
+
isSingleStep: true,
|
|
104
|
+
sections: ["Mécanique"],
|
|
105
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getTypeOfMovementQuestion, nb),
|
|
106
|
+
qcmTimer: 60,
|
|
107
|
+
freeTimer: 60,
|
|
108
|
+
getPropositions,
|
|
109
|
+
answerType: "QCM",
|
|
110
|
+
subject: "Physique",
|
|
111
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orderOfMagnitude.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/orderOfMagnitude.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA4DF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.orderOfMagnitude = void 0;
|
|
4
|
+
const exercise_1 = require("../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randfloat_1 = require("../../math/utils/random/randfloat");
|
|
7
|
+
const randint_1 = require("../../math/utils/random/randint");
|
|
8
|
+
const distanceUnits_1 = require("../../pc/units/distanceUnits");
|
|
9
|
+
const measure_1 = require("../../pc/measure/measure");
|
|
10
|
+
const numberNode_1 = require("../../tree/nodes/numbers/numberNode");
|
|
11
|
+
const powerNode_1 = require("../../tree/nodes/operators/powerNode");
|
|
12
|
+
const ten = new numberNode_1.NumberNode(10);
|
|
13
|
+
const getOrderOfMagnitudeQuestion = () => {
|
|
14
|
+
const exercise = generateExercise();
|
|
15
|
+
const question = {
|
|
16
|
+
answer: `${exercise.answer.toTex()}`,
|
|
17
|
+
instruction: exercise.instruction,
|
|
18
|
+
keys: [],
|
|
19
|
+
answerFormat: "tex",
|
|
20
|
+
identifiers: { order: exercise.order, multiplier: exercise.multiplier },
|
|
21
|
+
};
|
|
22
|
+
return question;
|
|
23
|
+
};
|
|
24
|
+
const getPropositions = (n, { answer, order, multiplier }) => {
|
|
25
|
+
const propositions = [];
|
|
26
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
27
|
+
generatePropositions(order, multiplier).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value));
|
|
28
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
29
|
+
};
|
|
30
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
31
|
+
return ans === answer;
|
|
32
|
+
};
|
|
33
|
+
const generatePropositions = (order, multiplier) => {
|
|
34
|
+
const correctAnswer = multiplier > 5 ? order + 1 : order;
|
|
35
|
+
const first = new powerNode_1.PowerNode(ten, (correctAnswer - 1).toTree()).toTex() + "m";
|
|
36
|
+
const second = new measure_1.Measure(multiplier, correctAnswer, distanceUnits_1.DistanceUnit.m).toTex();
|
|
37
|
+
const third = new powerNode_1.PowerNode(ten, correctAnswer.toTree()).toTex();
|
|
38
|
+
return [first, second, third];
|
|
39
|
+
};
|
|
40
|
+
const generateExercise = () => {
|
|
41
|
+
const order = (0, randint_1.randint)(-15, -10);
|
|
42
|
+
const multiplier = +(0, randfloat_1.randfloat)(1, 11).toFixed(1);
|
|
43
|
+
const diameter = new measure_1.Measure(multiplier, order, distanceUnits_1.DistanceUnit.m);
|
|
44
|
+
const answer = multiplier > 5
|
|
45
|
+
? new powerNode_1.PowerNode(ten, (order + 1).toTree())
|
|
46
|
+
: new powerNode_1.PowerNode(ten, order.toTree());
|
|
47
|
+
const instruction = `Supposons qu'on ait un atome de diamètre $${diameter.toTex()}$. Indiquez l'ordre de grandeur du diamètre de cet atome.`;
|
|
48
|
+
return {
|
|
49
|
+
answer,
|
|
50
|
+
order,
|
|
51
|
+
diameter,
|
|
52
|
+
multiplier,
|
|
53
|
+
instruction,
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
exports.orderOfMagnitude = {
|
|
57
|
+
id: "orderOfMagnitude",
|
|
58
|
+
label: "Calcul d'ordre de grandeur",
|
|
59
|
+
levels: ["2nde"],
|
|
60
|
+
isSingleStep: true,
|
|
61
|
+
sections: ["Chimie organique"],
|
|
62
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getOrderOfMagnitudeQuestion, nb),
|
|
63
|
+
qcmTimer: 60,
|
|
64
|
+
freeTimer: 60,
|
|
65
|
+
getPropositions,
|
|
66
|
+
isAnswerValid,
|
|
67
|
+
subject: "Chimie",
|
|
68
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pH.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/pH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAkDF,eAAO,MAAM,EAAE,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"pH.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/pH.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAkDF,eAAO,MAAM,EAAE,EAAE,QAAQ,CAAC,WAAW,CAcpC,CAAC"}
|
package/lib/exercises/pc/pH.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"potentialEnergy.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/potentialEnergy.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,EACT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"potentialEnergy.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/potentialEnergy.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,QAAQ,EACT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAuDF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAajD,CAAC"}
|
|
@@ -5,15 +5,27 @@ const exercise_1 = require("../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const frenchify_1 = require("../../math/utils/latex/frenchify");
|
|
7
7
|
const round_1 = require("../../math/utils/round");
|
|
8
|
+
const gravity_1 = require("../../pc/constants/gravity");
|
|
9
|
+
const measure_1 = require("../../pc/measure/measure");
|
|
10
|
+
const distanceUnits_1 = require("../../pc/units/distanceUnits");
|
|
11
|
+
const energyUnit_1 = require("../../pc/units/energyUnit");
|
|
12
|
+
const massUnits_1 = require("../../pc/units/massUnits");
|
|
8
13
|
const shuffle_1 = require("../../utils/shuffle");
|
|
9
14
|
const getPotentialEnergy = () => {
|
|
10
15
|
const mass = Math.floor(Math.random() * 10 + 1); // Masse de l'objet entre 1 et 11 kg
|
|
16
|
+
const massMeasure = new measure_1.Measure(mass, 0, massUnits_1.MassUnit.kg);
|
|
11
17
|
const height = Math.floor(Math.random() * 50 + 1); // Hauteur par rapport à la référence entre 1 et 51 m
|
|
12
|
-
const
|
|
18
|
+
const heightMeasure = new measure_1.Measure(height, 0, distanceUnits_1.DistanceUnit.m);
|
|
13
19
|
const potentialEnergy = mass * 9.81 * height;
|
|
14
|
-
const instruction = `Un objet de masse $${
|
|
15
|
-
|
|
16
|
-
|
|
20
|
+
const instruction = `Un objet de masse $${massMeasure.toTex({
|
|
21
|
+
notScientific: true,
|
|
22
|
+
})}$ est suspendu à une hauteur de $${heightMeasure.toTex({
|
|
23
|
+
notScientific: true,
|
|
24
|
+
})}$. Il est ensuite relâché et tombe librement.
|
|
25
|
+
$\\\\$ Calculer l'énergie potentielle de l'objet. (Supposons que l'accélération due à la gravité est de $${gravity_1.earthGravityAcceleration.measure
|
|
26
|
+
.toSignificant(2)
|
|
27
|
+
.toTex()}$)`;
|
|
28
|
+
const answer = `${(0, frenchify_1.frenchify)((0, round_1.round)(potentialEnergy, 2))}${energyUnit_1.EnergyUnit.J.toTex()}`;
|
|
17
29
|
const question = {
|
|
18
30
|
instruction,
|
|
19
31
|
startStatement: "Ep",
|
|
@@ -34,7 +46,7 @@ const getPropositions = (n, { answer, height, mass }) => {
|
|
|
34
46
|
return (0, shuffle_1.shuffle)(propositions);
|
|
35
47
|
};
|
|
36
48
|
const isAnswerValid = (ans, { answer }) => {
|
|
37
|
-
return ans
|
|
49
|
+
return [ans, ans.replace("J", energyUnit_1.EnergyUnit.J.toTex())].includes(answer);
|
|
38
50
|
};
|
|
39
51
|
exports.potentialEnergy = {
|
|
40
52
|
id: "potentialEnergy",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calculatePowerOfLight.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/power/calculatePowerOfLight.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqFF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAcvD,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.calculatePowerOfLight = 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 distanceUnits_1 = require("../../../pc/units/distanceUnits");
|
|
9
|
+
const divideUnit_1 = require("../../../pc/units/divideUnit");
|
|
10
|
+
const powerUnits_1 = require("../../../pc/units/powerUnits");
|
|
11
|
+
const wattUnit_1 = require("../../../pc/units/wattUnit");
|
|
12
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
13
|
+
const two = new numberNode_1.NumberNode(2);
|
|
14
|
+
const getCalculatePowerOfLightQuestion = () => {
|
|
15
|
+
const exo = getExercise();
|
|
16
|
+
const question = {
|
|
17
|
+
answer: exo.answer,
|
|
18
|
+
instruction: exo.instruction,
|
|
19
|
+
keys: [],
|
|
20
|
+
hint: exo.hint,
|
|
21
|
+
correction: exo.correction,
|
|
22
|
+
answerFormat: "tex",
|
|
23
|
+
identifiers: {
|
|
24
|
+
E: exo.E.significantPart * Math.pow(10, exo.E.exponent),
|
|
25
|
+
S: exo.S.significantPart * Math.pow(10, exo.S.exponent),
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
return question;
|
|
29
|
+
};
|
|
30
|
+
const getPropositions = (n, { answer, E, S }) => {
|
|
31
|
+
const propositions = [];
|
|
32
|
+
(0, exercise_1.addValidProp)(propositions, answer + `\\ ${wattUnit_1.WattUnit.W.toTex()}`);
|
|
33
|
+
generatePropositions(E, S).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value.toTex({ notScientific: true })));
|
|
34
|
+
let random;
|
|
35
|
+
while (propositions.length < n) {
|
|
36
|
+
random = (0, randint_1.randint)(E * S - 10, E * S + 10, [E]);
|
|
37
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new measure_1.Measure(random, 0, wattUnit_1.WattUnit.W).toTex({ notScientific: true }));
|
|
38
|
+
}
|
|
39
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
40
|
+
};
|
|
41
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
42
|
+
return ans === answer;
|
|
43
|
+
};
|
|
44
|
+
const generatePropositions = (E, S) => {
|
|
45
|
+
const first = new measure_1.Measure(Math.floor(E / S), 0, wattUnit_1.WattUnit.W);
|
|
46
|
+
return [first];
|
|
47
|
+
};
|
|
48
|
+
const getExercise = () => {
|
|
49
|
+
const E = new measure_1.Measure((0, randint_1.randint)(10, 30), 0, new divideUnit_1.DivideUnit(wattUnit_1.WattUnit.W, new powerUnits_1.PowerUnit(distanceUnits_1.DistanceUnit.m, two)));
|
|
50
|
+
const S = new measure_1.Measure((0, randint_1.randint)(3, 11), 0, new powerUnits_1.PowerUnit(distanceUnits_1.DistanceUnit.m, two));
|
|
51
|
+
const lightPower = E.times(S).toSignificant(2);
|
|
52
|
+
const instruction = `Une cellule photovoltaïque est exposée à une lumière dont l'éclairement $E$ est de $${E.toTex({ notScientific: true })}$.\n \\
|
|
53
|
+
La surface utile $S$ de cette cellule est de $${S.toTex({
|
|
54
|
+
notScientific: true,
|
|
55
|
+
})}$. Calculez la puissance lumineuse reçue par la cellule photovoltaïque. $${lightPower.toTex({ notScientific: true })}$`;
|
|
56
|
+
const hint = `Rappel : La puissance lumineuse reçue $P$, exprimée en $${wattUnit_1.WattUnit.W.toTex()}$, est donnée par la formule :
|
|
57
|
+
- $P=E \\cdot S$
|
|
58
|
+
`;
|
|
59
|
+
const correction = `En appliquant la formule $P=E \\cdot S$ on obtient :
|
|
60
|
+
- $P=${E.toTex({ notScientific: true })} \\times ${S.toTex({
|
|
61
|
+
notScientific: true,
|
|
62
|
+
})}\\ \\Rightarrow P=${lightPower.toTex({ notScientific: true })}$`;
|
|
63
|
+
return {
|
|
64
|
+
instruction,
|
|
65
|
+
answer: lightPower.toTex({ hideUnit: true, notScientific: true }),
|
|
66
|
+
hint,
|
|
67
|
+
correction,
|
|
68
|
+
E,
|
|
69
|
+
S,
|
|
70
|
+
lightPower,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
exports.calculatePowerOfLight = {
|
|
74
|
+
id: "calculatePowerOfLight",
|
|
75
|
+
label: "Calcul de puissance lumineuse.",
|
|
76
|
+
levels: ["1reSpé"],
|
|
77
|
+
isSingleStep: true,
|
|
78
|
+
sections: ["Lumière"],
|
|
79
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCalculatePowerOfLightQuestion, nb),
|
|
80
|
+
qcmTimer: 60,
|
|
81
|
+
freeTimer: 60,
|
|
82
|
+
getPropositions,
|
|
83
|
+
isAnswerValid,
|
|
84
|
+
subject: "Physique",
|
|
85
|
+
hasHintAndCorrection: true,
|
|
86
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/power/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|