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 @@
|
|
|
1
|
+
{"version":3,"file":"moleculeCountFromMol.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/mole/moleculeCountFromMol.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AA8DxC,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.moleculeCountFromMol = 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 atoms_1 = require("../../../pc/constants/molecularChemistry/atoms");
|
|
8
|
+
const getMoleculeCountFromMolQuestion = () => {
|
|
9
|
+
const quantity = (0, randfloat_1.randfloat)(0.01, 100, 2); // Quantité de matière en moles, entre 0.01 et 10 moles
|
|
10
|
+
const numberOfMolecules = atoms_1.avogadroConstant.value
|
|
11
|
+
.times(quantity)
|
|
12
|
+
.toSignificant(2);
|
|
13
|
+
const question = {
|
|
14
|
+
answer: numberOfMolecules.toTex(),
|
|
15
|
+
instruction: `Calculer le nombre de molécules dans un échantillon contenant $${quantity.frenchify()} \\ mol$ de substance.`,
|
|
16
|
+
keys: ["mol", "timesTenPower"],
|
|
17
|
+
answerFormat: "tex",
|
|
18
|
+
identifiers: { quantity },
|
|
19
|
+
};
|
|
20
|
+
return question;
|
|
21
|
+
};
|
|
22
|
+
const getPropositions = (n, { answer, quantity }) => {
|
|
23
|
+
const propositions = [];
|
|
24
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
25
|
+
const w1 = atoms_1.avogadroConstant.value.divide(quantity).toSignificant(2);
|
|
26
|
+
const w2 = `$${answer} mol$`;
|
|
27
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, w1.toTex());
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, w2);
|
|
29
|
+
while (propositions.length < n) {
|
|
30
|
+
const wrongAnswer = (parseFloat(answer) * (0, randfloat_1.randfloat)(0.5, 1.5, 2)).toScientific(2);
|
|
31
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer.toTex());
|
|
32
|
+
}
|
|
33
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
34
|
+
};
|
|
35
|
+
const isAnswerValid = (ans, { answer, quantity }) => {
|
|
36
|
+
let latexs = [];
|
|
37
|
+
const validanswer1 = atoms_1.avogadroConstant.value
|
|
38
|
+
.times(quantity)
|
|
39
|
+
.toSignificant(1)
|
|
40
|
+
.toTex();
|
|
41
|
+
const validanswer2 = atoms_1.avogadroConstant.value
|
|
42
|
+
.times(quantity)
|
|
43
|
+
.toSignificant(2)
|
|
44
|
+
.toTex();
|
|
45
|
+
const validanswer3 = atoms_1.avogadroConstant.value
|
|
46
|
+
.times(quantity)
|
|
47
|
+
.toSignificant(3)
|
|
48
|
+
.toTex();
|
|
49
|
+
latexs.push(validanswer1);
|
|
50
|
+
latexs.push(validanswer2);
|
|
51
|
+
latexs.push(validanswer3);
|
|
52
|
+
return latexs.includes(ans);
|
|
53
|
+
};
|
|
54
|
+
exports.moleculeCountFromMol = {
|
|
55
|
+
id: "moleculeCountFromMol",
|
|
56
|
+
label: "Calculer le nombre de molécules dans un échantillon",
|
|
57
|
+
levels: ["2nde"],
|
|
58
|
+
isSingleStep: true,
|
|
59
|
+
sections: ["Chimie organique"],
|
|
60
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getMoleculeCountFromMolQuestion, nb),
|
|
61
|
+
qcmTimer: 60,
|
|
62
|
+
freeTimer: 60,
|
|
63
|
+
getPropositions,
|
|
64
|
+
isAnswerValid,
|
|
65
|
+
subject: "Chimie",
|
|
66
|
+
};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.moleculeFormula = void 0;
|
|
4
4
|
const exercise_1 = require("../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
-
const molecule_1 = require("../../pc/molecularChemistry/molecule");
|
|
6
|
+
const molecule_1 = require("../../pc/constants/molecularChemistry/molecule");
|
|
7
7
|
const shuffle_1 = require("../../utils/shuffle");
|
|
8
8
|
const getMoleculeNFormula = () => {
|
|
9
9
|
const organicMolecule = molecule_1.molecules.filter((molecule) => molecule.isOrganic && molecule.iupact);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.moleculeNomenclature = void 0;
|
|
4
4
|
const exercise_1 = require("../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../exercises/utils/getDistinctQuestions");
|
|
6
|
-
const molecule_1 = require("../../pc/molecularChemistry/molecule");
|
|
6
|
+
const molecule_1 = require("../../pc/constants/molecularChemistry/molecule");
|
|
7
7
|
const shuffle_1 = require("../../utils/shuffle");
|
|
8
8
|
const getMoleculeNomenclature = () => {
|
|
9
9
|
const organicMolecule = molecule_1.molecules.filter((molecule) => molecule.isOrganic && molecule.type);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
distance: measure;
|
|
4
|
+
time: measure;
|
|
5
|
+
};
|
|
6
|
+
type measure = {
|
|
7
|
+
value: number;
|
|
8
|
+
unitIndex: number;
|
|
9
|
+
};
|
|
10
|
+
export declare const averageSpeed: Exercise<Identifiers>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=averageSpeed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"averageSpeed.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/averageSpeed.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,KAAK,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAoJpD,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAa9C,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.averageSpeed = 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 measure_1 = require("../../../pc/measure/measure");
|
|
9
|
+
const distanceUnits_1 = require("../../../pc/units/distanceUnits");
|
|
10
|
+
const timeUnits_1 = require("../../../pc/units/timeUnits");
|
|
11
|
+
const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
|
|
12
|
+
const variableNode_1 = require("../../../tree/nodes/variables/variableNode");
|
|
13
|
+
const timeUnits = [timeUnits_1.TimeUnit.h, timeUnits_1.TimeUnit.mi];
|
|
14
|
+
const distanceUnitValues = [distanceUnits_1.DistanceUnit.km, distanceUnits_1.DistanceUnit.m];
|
|
15
|
+
const getAverageSpeedQuestion = () => {
|
|
16
|
+
const exo = generateExercise();
|
|
17
|
+
const question = {
|
|
18
|
+
answer: exo.answer.toTex(),
|
|
19
|
+
instruction: exo.instruction,
|
|
20
|
+
keys: [],
|
|
21
|
+
hint: "Rappel : vitesse moyenne = $\\frac{\\text{distance}}{\\text{temps}}$ $m \\cdot s^{-1}$",
|
|
22
|
+
correction: exo.correction,
|
|
23
|
+
answerFormat: "tex",
|
|
24
|
+
identifiers: { distance: exo.distance, time: exo.time },
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
};
|
|
28
|
+
const getPropositions = (n, { answer, distance, time }) => {
|
|
29
|
+
const propositions = [];
|
|
30
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
31
|
+
const distanceMeasure = new measure_1.Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]);
|
|
32
|
+
const timeMeasure = new measure_1.Measure(time.value, 0, timeUnits[time.unitIndex]);
|
|
33
|
+
genearatePropositions(distanceMeasure, timeMeasure).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value));
|
|
34
|
+
const division = distanceMeasure
|
|
35
|
+
.convert("m")
|
|
36
|
+
.divide(timeMeasure.convert("s"));
|
|
37
|
+
const divisionValue = division.significantPart * division.exponent;
|
|
38
|
+
while (propositions.length < n) {
|
|
39
|
+
let random = (0, randfloat_1.randfloat)(divisionValue - 10, divisionValue + 11);
|
|
40
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new measure_1.Measure(random, 0, division.getUnit()).toSignificant(2).toTex());
|
|
41
|
+
}
|
|
42
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
43
|
+
};
|
|
44
|
+
const genearatePropositions = (distance, time) => {
|
|
45
|
+
const distanceInMeter = distance.convert("m");
|
|
46
|
+
const timeInSeconds = time.convert("s");
|
|
47
|
+
return [
|
|
48
|
+
distanceInMeter.times(timeInSeconds).toSignificant(2).toTex(),
|
|
49
|
+
distanceInMeter.divide(time).toSignificant(2).toTex(),
|
|
50
|
+
distance.divide(timeInSeconds).toSignificant(2).toTex(),
|
|
51
|
+
distance.divide(time).toSignificant(2).toTex(),
|
|
52
|
+
];
|
|
53
|
+
};
|
|
54
|
+
const isAnswerValid = (ans, { answer, distance, time }) => {
|
|
55
|
+
const distanceMeasure = new measure_1.Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]).convert("m");
|
|
56
|
+
const timeMeasure = new measure_1.Measure(time.value, 0, timeUnits[time.unitIndex]).convert("s");
|
|
57
|
+
return [
|
|
58
|
+
answer,
|
|
59
|
+
distanceMeasure
|
|
60
|
+
.divide(timeMeasure)
|
|
61
|
+
.toSignificant(2)
|
|
62
|
+
.toTex({ hideUnit: true }),
|
|
63
|
+
].includes(ans);
|
|
64
|
+
};
|
|
65
|
+
const generateExercise = () => {
|
|
66
|
+
const distance = { value: (0, randint_1.randint)(70, 151), unitIndex: (0, randint_1.randint)(0, 2) };
|
|
67
|
+
const time = { value: (0, randint_1.randint)(10, 61), unitIndex: (0, randint_1.randint)(0, 2) };
|
|
68
|
+
const distanceMeasure = new measure_1.Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]);
|
|
69
|
+
const timeMeasure = new measure_1.Measure(time.value, 0, timeUnits[time.unitIndex]);
|
|
70
|
+
const instruction = `Soit un objet parcourant $${distanceMeasure.toTex({
|
|
71
|
+
notScientific: true,
|
|
72
|
+
})}$ en $${timeMeasure.toTex({ notScientific: true })}$. \n \\
|
|
73
|
+
Caculer la vitesse moyenne de cet objet en $${distanceUnits_1.DistanceUnit.m.toTex()} \\cdot ${timeUnits_1.TimeUnit.s.toTex()}^{-1}$.
|
|
74
|
+
`;
|
|
75
|
+
const answer = distanceMeasure
|
|
76
|
+
.convert("m")
|
|
77
|
+
.divide(timeMeasure.convert("s"))
|
|
78
|
+
.toSignificant(2);
|
|
79
|
+
const correction = getCorrection(distance, time);
|
|
80
|
+
return {
|
|
81
|
+
instruction,
|
|
82
|
+
answer,
|
|
83
|
+
distance,
|
|
84
|
+
time,
|
|
85
|
+
correction,
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
const getCorrection = (distance, time) => {
|
|
89
|
+
let correction = ``;
|
|
90
|
+
let step = 1;
|
|
91
|
+
const distanceMeasure = new measure_1.Measure(distance.value, 0, distanceUnitValues[distance.unitIndex]).convert("m");
|
|
92
|
+
const timeMeasure = new measure_1.Measure(time.value, 0, timeUnits[time.unitIndex]).convert("s");
|
|
93
|
+
const calcul = new fractionNode_1.FractionNode(new variableNode_1.VariableNode(distanceMeasure.toSignificant(2).toTex()), new variableNode_1.VariableNode(timeMeasure.toSignificant(2).toTex()));
|
|
94
|
+
const answer = distanceMeasure.divide(timeMeasure).toSignificant(2).toTex();
|
|
95
|
+
if (distance.unitIndex === 0)
|
|
96
|
+
correction = `${step++}. Convertir les $km$ en $m$ : $1km=1000m$.`;
|
|
97
|
+
switch (time.unitIndex) {
|
|
98
|
+
case 0:
|
|
99
|
+
correction = `${correction}
|
|
100
|
+
${step++}. Convertir les heures en secondes : $1h = 3600s$.`;
|
|
101
|
+
break;
|
|
102
|
+
case 1:
|
|
103
|
+
correction = `${correction}
|
|
104
|
+
${step++}. Convertir les minutes en secondes : $1m = 60s$.`;
|
|
105
|
+
}
|
|
106
|
+
return `${correction}
|
|
107
|
+
${step}. Appliquer la règle de calcul pour la vitesse moyenne : $${calcul.toTex()} = ${answer}$`;
|
|
108
|
+
};
|
|
109
|
+
exports.averageSpeed = {
|
|
110
|
+
id: "averageSpeed",
|
|
111
|
+
label: "Caclul de vitesse moyenne",
|
|
112
|
+
levels: ["2nde"],
|
|
113
|
+
isSingleStep: true,
|
|
114
|
+
sections: ["Mécanique"],
|
|
115
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAverageSpeedQuestion, 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
|
+
speed: number;
|
|
4
|
+
distance: number;
|
|
5
|
+
deltaTime: number;
|
|
6
|
+
target: "vitesse moyenne" | "distance" | "temps";
|
|
7
|
+
};
|
|
8
|
+
export declare const AverageSpeedCalculationExercise: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=averageSpeedCalculation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"averageSpeedCalculation.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/averageSpeedCalculation.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,iBAAiB,GAAG,UAAU,GAAG,OAAO,CAAC;CAClD,CAAC;AA4MF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AverageSpeedCalculationExercise = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const round_1 = require("../../../math/utils/round");
|
|
7
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const divideUnit_1 = require("../../../pc/units/divideUnit");
|
|
10
|
+
const timeUnits_1 = require("../../../pc/units/timeUnits");
|
|
11
|
+
const distanceUnits_1 = require("../../../pc/units/distanceUnits");
|
|
12
|
+
const measure_1 = require("../../../pc/measure/measure");
|
|
13
|
+
const getAverageSpeedQuestion = () => {
|
|
14
|
+
const speed = (0, round_1.round)((0, randfloat_1.randfloat)(900, 1400), 2); // Vitesse en km/h
|
|
15
|
+
const distance = (0, round_1.round)((0, randfloat_1.randfloat)(100, 2000), 2); // Distance en km
|
|
16
|
+
const deltaTime = (0, round_1.round)(distance / speed, 2); // Temps en heures
|
|
17
|
+
const variables = [
|
|
18
|
+
{
|
|
19
|
+
name: "vitesse moyenne",
|
|
20
|
+
value: new measure_1.Measure(speed, 0, new divideUnit_1.DivideUnit(distanceUnits_1.DistanceUnit.km, timeUnits_1.TimeUnit.h)),
|
|
21
|
+
symbol: "v",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "distance",
|
|
25
|
+
value: new measure_1.Measure(distance, 0, distanceUnits_1.DistanceUnit.km),
|
|
26
|
+
symbol: "d",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "temps",
|
|
30
|
+
value: new measure_1.Measure(deltaTime, 0, timeUnits_1.TimeUnit.h),
|
|
31
|
+
symbol: "\\Delta t",
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
const randomIndex = (0, randint_1.randint)(0, variables.length);
|
|
35
|
+
const targetVariable = variables[randomIndex];
|
|
36
|
+
const knownVariables = variables.filter((_, index) => index !== randomIndex);
|
|
37
|
+
const instruction = `Lors d'une mission d'entraînement, un avion de chasse Rafale a été chronométré et mesuré. Voici les données recueillies :
|
|
38
|
+
- ${knownVariables[0].name.charAt(0).toUpperCase() +
|
|
39
|
+
knownVariables[0].name.slice(1)} : $${knownVariables[0].symbol} = ${knownVariables[0].value.toTex({
|
|
40
|
+
notScientific: true,
|
|
41
|
+
})}$
|
|
42
|
+
- ${knownVariables[1].name.charAt(0).toUpperCase() +
|
|
43
|
+
knownVariables[1].name.slice(1)} : $${knownVariables[1].symbol} = ${knownVariables[1].value.toTex({
|
|
44
|
+
notScientific: true,
|
|
45
|
+
})}$. \n
|
|
46
|
+
Utilisez ces informations pour calculer ${targetVariable.name === "distance" ||
|
|
47
|
+
targetVariable.name === "vitesse moyenne"
|
|
48
|
+
? "la"
|
|
49
|
+
: "le"} ${targetVariable.name} en $${targetVariable.value.getUnit().toTex()}$.`;
|
|
50
|
+
const hint = targetVariable.name === "vitesse moyenne"
|
|
51
|
+
? `Rappelez-vous la formule de la vitesse moyenne : $v = \\frac{d}{\\Delta t}$.`
|
|
52
|
+
: targetVariable.name === "distance"
|
|
53
|
+
? `Rappelez-vous la formule de la distance : $d = v \\times \\Delta t$.`
|
|
54
|
+
: `Rappelez-vous la formule du temps : $\\Delta t = \\frac{d}{v}$.`;
|
|
55
|
+
const correction = targetVariable.name === "vitesse moyenne"
|
|
56
|
+
? `La vitesse moyenne est calculée en utilisant la formule $v = \\frac{d}{\\Delta t}$. Donc, $v = \\frac{${(0, round_1.round)(distance, 2)
|
|
57
|
+
.toTree()
|
|
58
|
+
.toTex()}}{${(0, round_1.round)(deltaTime, 2).toTree().toTex()}} = ${new measure_1.Measure((0, round_1.round)(distance / deltaTime, 2), 0, targetVariable.value.getUnit()).toTex({ notScientific: true })}$.`
|
|
59
|
+
: targetVariable.name === "distance"
|
|
60
|
+
? `La distance est calculée en utilisant la formule $d = v \\times \\Delta t$. Donc, $d = ${(0, round_1.round)(speed, 2)
|
|
61
|
+
.toTree()
|
|
62
|
+
.toTex()} \\times ${(0, round_1.round)(deltaTime, 2)
|
|
63
|
+
.toTree()
|
|
64
|
+
.toTex()} = ${new measure_1.Measure((0, round_1.round)(speed * deltaTime, 2), 0, distanceUnits_1.DistanceUnit.km).toTex({ notScientific: true })}$.`
|
|
65
|
+
: `Le temps est calculé en utilisant la formule $\\Delta t = \\frac{d}{v}$. Donc, $t = \\frac{${(0, round_1.round)(distance, 2)
|
|
66
|
+
.toTree()
|
|
67
|
+
.toTex()}}{${(0, round_1.round)(speed, 2).toTree().toTex()}} = ${new measure_1.Measure((0, round_1.round)(distance / speed, 2), 0, timeUnits_1.TimeUnit.h).toTex({ notScientific: true })}$.`;
|
|
68
|
+
const question = {
|
|
69
|
+
answer: getCorrectAns(targetVariable.name, speed, distance, deltaTime).toTex({
|
|
70
|
+
notScientific: true,
|
|
71
|
+
hideUnit: true,
|
|
72
|
+
}),
|
|
73
|
+
instruction,
|
|
74
|
+
hint,
|
|
75
|
+
correction,
|
|
76
|
+
keys: [],
|
|
77
|
+
answerFormat: "tex",
|
|
78
|
+
identifiers: {
|
|
79
|
+
speed,
|
|
80
|
+
distance,
|
|
81
|
+
deltaTime,
|
|
82
|
+
target: targetVariable.name,
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
return question;
|
|
86
|
+
};
|
|
87
|
+
const getPropositions = (n, { answer, speed, distance, deltaTime, target }) => {
|
|
88
|
+
const propositions = [];
|
|
89
|
+
(0, exercise_1.addValidProp)(propositions, answer, "tex");
|
|
90
|
+
if (target === "vitesse moyenne") {
|
|
91
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(speed * (0, randfloat_1.randfloat)(0.5, 1.5), 2)
|
|
92
|
+
.toTree()
|
|
93
|
+
.toTex(), "tex");
|
|
94
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(speed / (0, randfloat_1.randfloat)(0.5, 1.5), 2)
|
|
95
|
+
.toTree()
|
|
96
|
+
.toTex(), "tex");
|
|
97
|
+
}
|
|
98
|
+
else if (target === "distance") {
|
|
99
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(distance * (0, randfloat_1.randfloat)(0.5, 1.5), 2)
|
|
100
|
+
.toTree()
|
|
101
|
+
.toTex(), "tex");
|
|
102
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(distance / (0, randfloat_1.randfloat)(0.5, 1.5), 2)
|
|
103
|
+
.toTree()
|
|
104
|
+
.toTex(), "tex");
|
|
105
|
+
}
|
|
106
|
+
else if (target === "temps") {
|
|
107
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(deltaTime * (0, randfloat_1.randfloat)(0.5, 1.5), 2)
|
|
108
|
+
.toTree()
|
|
109
|
+
.toTex(), "tex");
|
|
110
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(deltaTime / (0, randfloat_1.randfloat)(0.5, 1.5), 2)
|
|
111
|
+
.toTree()
|
|
112
|
+
.toTex(), "tex");
|
|
113
|
+
}
|
|
114
|
+
while (propositions.length < n) {
|
|
115
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(100, 2000, 2).toTree().toTex());
|
|
116
|
+
}
|
|
117
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
118
|
+
};
|
|
119
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
120
|
+
return ans === answer;
|
|
121
|
+
};
|
|
122
|
+
const getCorrectAns = (targetVariable, speed, distance, deltaTime) => {
|
|
123
|
+
switch (targetVariable) {
|
|
124
|
+
case "distance":
|
|
125
|
+
return new measure_1.Measure((0, round_1.round)(speed * deltaTime, 2), 0, distanceUnits_1.DistanceUnit.km);
|
|
126
|
+
case "vitesse moyenne":
|
|
127
|
+
return new measure_1.Measure((0, round_1.round)(distance / deltaTime, 2), 0, new divideUnit_1.DivideUnit(distanceUnits_1.DistanceUnit.km, timeUnits_1.TimeUnit.h));
|
|
128
|
+
case "temps":
|
|
129
|
+
return new measure_1.Measure((0, round_1.round)(distance / speed, 2), 0, timeUnits_1.TimeUnit.h);
|
|
130
|
+
}
|
|
131
|
+
return new measure_1.Measure(0);
|
|
132
|
+
};
|
|
133
|
+
exports.AverageSpeedCalculationExercise = {
|
|
134
|
+
id: "averageSpeedCalculation",
|
|
135
|
+
label: "Calculer la vitesse moyenne, la distance ou le temps d'un objet en mouvement",
|
|
136
|
+
levels: ["2nde"],
|
|
137
|
+
isSingleStep: true,
|
|
138
|
+
sections: ["Mécanique"],
|
|
139
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAverageSpeedQuestion, nb),
|
|
140
|
+
qcmTimer: 60,
|
|
141
|
+
freeTimer: 60,
|
|
142
|
+
getPropositions,
|
|
143
|
+
isAnswerValid,
|
|
144
|
+
subject: "Physique",
|
|
145
|
+
hasHintAndCorrection: true,
|
|
146
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"characteristicsOfVelocityVector.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/characteristicsOfVelocityVector.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAqFF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAajE,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.characteristicsOfVelocityVector = 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 randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
10
|
+
const getCharacteristicsOfVelocityVectorQuestion = () => {
|
|
11
|
+
const exo = generateExercise();
|
|
12
|
+
const question = {
|
|
13
|
+
answer: exo.answer.frenchify(),
|
|
14
|
+
instruction: exo.instruction,
|
|
15
|
+
keys: [],
|
|
16
|
+
commands: exo.ggb.commands,
|
|
17
|
+
coords: exo.ggbCoords,
|
|
18
|
+
answerFormat: "tex",
|
|
19
|
+
identifiers: { norm: exo.answer },
|
|
20
|
+
};
|
|
21
|
+
return question;
|
|
22
|
+
};
|
|
23
|
+
const getPropositions = (n, { answer, norm }) => {
|
|
24
|
+
const propositions = [];
|
|
25
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
26
|
+
while (propositions.length < n) {
|
|
27
|
+
let random = (0, randfloat_1.randfloat)(norm - 3, norm + 4, 2, [norm]);
|
|
28
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, random.frenchify());
|
|
29
|
+
}
|
|
30
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
31
|
+
};
|
|
32
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
33
|
+
return ans === answer;
|
|
34
|
+
};
|
|
35
|
+
const generateExercise = () => {
|
|
36
|
+
const delta = (0, randint_1.randint)(2, 11);
|
|
37
|
+
const ggb = getGgb(delta);
|
|
38
|
+
const instruction = `
|
|
39
|
+
Un objet en mouvement rectiligne uniforme est suivi par une chronographie. \n \\
|
|
40
|
+
Les points marqués par la chronographie sur la bande de papier sont espacés uniformément en temps, avec un intervalle de $${delta}$ seconde entre chaque point. \n \\
|
|
41
|
+
Calculer la norme du vecteur vitesse $\\overrightarrow{M}$
|
|
42
|
+
`;
|
|
43
|
+
const answer = ggb.speedVector.norm;
|
|
44
|
+
return {
|
|
45
|
+
instruction,
|
|
46
|
+
ggb: new geogebraConstructor_1.GeogebraConstructor(ggb.commands, { isAxesRatioFixed: true }),
|
|
47
|
+
ggbCoords: ggb.coords,
|
|
48
|
+
answer,
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
const getGgb = (delta) => {
|
|
52
|
+
const commands = [];
|
|
53
|
+
const constant = (0, randint_1.randint)(3, 8);
|
|
54
|
+
const step = (0, randint_1.randint)(3, 8);
|
|
55
|
+
let speedVector = null;
|
|
56
|
+
for (let x = 0; x < 4 * step; x += step) {
|
|
57
|
+
if ((speedVector === null && (0, coinFlip_1.coinFlip)()) || x === 2 * step)
|
|
58
|
+
speedVector = {
|
|
59
|
+
x1: x,
|
|
60
|
+
y1: constant,
|
|
61
|
+
x2: x + step,
|
|
62
|
+
y2: constant,
|
|
63
|
+
norm: +(step / delta).toFixed(2),
|
|
64
|
+
};
|
|
65
|
+
commands.push(`Point({${x},${constant}})`);
|
|
66
|
+
}
|
|
67
|
+
commands.push(` M = Vector((${speedVector.x1},${speedVector.y1}),(${speedVector.x2},${speedVector.y2}))`, `Text("$\\overrightarrow{\\mathit{M}}$",(${speedVector.x1},${speedVector.y1 + 2}),false,true)`);
|
|
68
|
+
return {
|
|
69
|
+
commands,
|
|
70
|
+
speedVector,
|
|
71
|
+
coords: [-1, Math.max(step * 5, 20), -2, 10],
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
exports.characteristicsOfVelocityVector = {
|
|
75
|
+
id: "characteristicsOfVelocityVector",
|
|
76
|
+
label: "calculer la norme d'un vecteur vitesse",
|
|
77
|
+
levels: ["2nde"],
|
|
78
|
+
isSingleStep: true,
|
|
79
|
+
sections: ["Mécanique"],
|
|
80
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCharacteristicsOfVelocityVectorQuestion, nb),
|
|
81
|
+
qcmTimer: 60,
|
|
82
|
+
freeTimer: 60,
|
|
83
|
+
getPropositions,
|
|
84
|
+
isAnswerValid,
|
|
85
|
+
subject: "Physique",
|
|
86
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "./characteristicsOfVelocityVector";
|
|
2
|
+
export * from "./typeOfMovement";
|
|
3
|
+
export * from "./averageSpeed";
|
|
4
|
+
export * from "./typeOfAcceleration";
|
|
5
|
+
export * from "./motionReference";
|
|
6
|
+
export * from "./averageSpeedCalculation";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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("./characteristicsOfVelocityVector"), exports);
|
|
18
|
+
__exportStar(require("./typeOfMovement"), exports);
|
|
19
|
+
__exportStar(require("./averageSpeed"), exports);
|
|
20
|
+
__exportStar(require("./typeOfAcceleration"), exports);
|
|
21
|
+
__exportStar(require("./motionReference"), exports);
|
|
22
|
+
__exportStar(require("./averageSpeedCalculation"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
object1: string;
|
|
4
|
+
object2: string;
|
|
5
|
+
reference: "à l'autre" | "au sol";
|
|
6
|
+
};
|
|
7
|
+
export declare const MotionReferenceExercise: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=motionReference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motionReference.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/motionReference.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,WAAW,GAAG,QAAQ,CAAC;CACnC,CAAC;AA0LF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAgBzD,CAAC"}
|