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
|
@@ -84,8 +84,9 @@ export interface Exercise<TIdentifiers = {}> {
|
|
|
84
84
|
isGGBAnswerValid?: GGBVEA<TIdentifiers>;
|
|
85
85
|
hasGeogebra?: boolean;
|
|
86
86
|
subject: "Mathématiques" | "Chimie" | "Physique";
|
|
87
|
+
hasHintAndCorrection?: boolean;
|
|
87
88
|
}
|
|
88
89
|
export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
|
|
89
90
|
export type MathSection = "Aires" | "Arithmétique" | "Calcul littéral" | "Calculs" | "Combinatoire et dénombrement" | "Conversions" | "Dérivation" | "Droites" | "Ensembles et intervalles" | "Équations" | "Équations différentielles" | "Exponentielle" | "Fonction cube" | "Fonction inverse" | "Fonctions" | "Fonctions affines" | "Fonctions de référence" | "Fractions" | "Géométrie cartésienne" | "Géométrie euclidienne" | "Inéquations" | "Intégration" | "Limites" | "Logarithme népérien" | "Logarithme décimal" | "Matrices" | "Nombres complexes" | "Périmètres" | "Pourcentages" | "Primitives" | "Probabilités" | "Produit scalaire" | "Proportionnalité" | "Python" | "Puissances" | "Python" | "Racines carrées" | "Second degré" | "Statistiques" | "Suites" | "Systèmes" | "Théorème de Pythagore" | "Théorème de Thalès" | "Trigonométrie" | "Valeur absolue" | "Vecteurs";
|
|
90
|
-
export type PCSection = "Réaction chimique" | "Chimie des solutions" | "Forces" | "Chimie organique" | "Mécanique" | "Lumière" | "Acide / Base" | "Constitution et transformations de la matière" | "Ondes" | "Son" | "Corps purs et mélanges" | "Fluides" | "Mol" | "Électricité" | "Spectrophotométrie" | "Quantique";
|
|
91
|
+
export type PCSection = "Réaction chimique" | "Chimie des solutions" | "Forces" | "Chimie organique" | "Mécanique" | "Lumière" | "Acide / Base" | "Constitution et transformations de la matière" | "Ondes" | "Son" | "Corps purs et mélanges" | "Fluides" | "Mol" | "Électricité" | "Mécanique gravitationnelle" | "Spectrophotométrie" | "Quantique" | "Thermodynamique" | "Énergie";
|
|
91
92
|
//# sourceMappingURL=exercise.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ,CAAC,YAAY,GAAG,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC7B,SAAS,CAAC,EAA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ACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
|
|
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const decimal_1 = require("../../../math/numbers/decimals/decimal");
|
|
7
7
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
|
|
8
9
|
const getDigitDecimalRankQuestion = () => {
|
|
9
10
|
const decimalPartSize = (0, randint_1.randint)(2, 5);
|
|
10
11
|
const nb = decimal_1.DecimalConstructor.random(0, 1000, decimalPartSize);
|
|
@@ -20,6 +21,8 @@ const getDigitDecimalRankQuestion = () => {
|
|
|
20
21
|
keys: [],
|
|
21
22
|
answerFormat: "tex",
|
|
22
23
|
identifiers: { nb: nb.tex, rankAsked },
|
|
24
|
+
hint: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre après la virgule.`,
|
|
25
|
+
correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre après la virgule. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
|
|
23
26
|
};
|
|
24
27
|
return question;
|
|
25
28
|
};
|
|
@@ -38,9 +41,6 @@ const getPropositions = (n, { answer, nb }) => {
|
|
|
38
41
|
const isAnswerValid = (ans, { answer }) => {
|
|
39
42
|
return ans === answer;
|
|
40
43
|
};
|
|
41
|
-
const isGGBAnswerValid = (ans, { ggbAnswer }) => {
|
|
42
|
-
throw Error("GGBVea not implemented");
|
|
43
|
-
};
|
|
44
44
|
exports.digitDecimalRank = {
|
|
45
45
|
id: "digitDecimalRank",
|
|
46
46
|
connector: "=",
|
|
@@ -53,6 +53,6 @@ exports.digitDecimalRank = {
|
|
|
53
53
|
freeTimer: 60,
|
|
54
54
|
getPropositions,
|
|
55
55
|
isAnswerValid,
|
|
56
|
-
isGGBAnswerValid,
|
|
57
56
|
subject: "Mathématiques",
|
|
57
|
+
hasHintAndCorrection: true,
|
|
58
58
|
};
|
|
@@ -5,6 +5,7 @@ const exercise_1 = require("../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const integer_1 = require("../../../math/numbers/integer/integer");
|
|
7
7
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
|
|
8
9
|
const getDigitRankQuestion = () => {
|
|
9
10
|
const size = (0, randint_1.randint)(3, 6);
|
|
10
11
|
const nb = integer_1.IntegerConstructor.random(size);
|
|
@@ -18,6 +19,8 @@ const getDigitRankQuestion = () => {
|
|
|
18
19
|
.toTree()
|
|
19
20
|
.toTex()}$ ?`,
|
|
20
21
|
keys: [],
|
|
22
|
+
hint: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite.`,
|
|
23
|
+
correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
|
|
21
24
|
answerFormat: "tex",
|
|
22
25
|
identifiers: { nb, rankAsked },
|
|
23
26
|
};
|
|
@@ -38,9 +41,6 @@ const getPropositions = (n, { answer, nb }) => {
|
|
|
38
41
|
const isAnswerValid = (ans, { answer }) => {
|
|
39
42
|
return ans === answer;
|
|
40
43
|
};
|
|
41
|
-
const isGGBAnswerValid = (ans, { ggbAnswer }) => {
|
|
42
|
-
throw Error("GGBVea not implemented");
|
|
43
|
-
};
|
|
44
44
|
exports.digitRank = {
|
|
45
45
|
id: "digitRank",
|
|
46
46
|
connector: "=",
|
|
@@ -53,6 +53,6 @@ exports.digitRank = {
|
|
|
53
53
|
freeTimer: 60,
|
|
54
54
|
getPropositions,
|
|
55
55
|
isAnswerValid,
|
|
56
|
-
isGGBAnswerValid,
|
|
57
56
|
subject: "Mathématiques",
|
|
57
|
+
hasHintAndCorrection: true,
|
|
58
58
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digitRankNumber.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRankNumber.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA8CF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.digitRankNumber = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const integer_1 = require("../../../math/numbers/integer/integer");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const ordinals = ["premier", "deuxième", "troisième", "quatrième"];
|
|
9
|
+
const getDigitRankNumberQuestion = () => {
|
|
10
|
+
const size = (0, randint_1.randint)(3, 6);
|
|
11
|
+
const nb = integer_1.IntegerConstructor.random(size);
|
|
12
|
+
const rankAsked = (0, randint_1.randint)(0, Math.min(size, 4));
|
|
13
|
+
const rankAskedLabel = integer_1.integerDigitRanks[rankAsked];
|
|
14
|
+
const nbString = nb.toString();
|
|
15
|
+
const answer = nbString.substring(0, nbString.length - rankAsked);
|
|
16
|
+
const question = {
|
|
17
|
+
answer,
|
|
18
|
+
instruction: `Quel est le nombre ${rankAsked === 0 ? "d'" : "de "}${rankAskedLabel} dans le nombre $${nb.toTree().toTex()}$ ?`,
|
|
19
|
+
keys: [],
|
|
20
|
+
hint: `Attention ! On demande le 'nombre' et non pas le 'chiffre' !`,
|
|
21
|
+
correction: `Le chiffre des ${rankAskedLabel} est le ${ordinals[rankAsked]} chiffre en partant de la droite. Donc le chiffre des ${rankAskedLabel} est $${answer}$.`,
|
|
22
|
+
answerFormat: "tex",
|
|
23
|
+
identifiers: { nb, rankAsked },
|
|
24
|
+
};
|
|
25
|
+
return question;
|
|
26
|
+
};
|
|
27
|
+
const getPropositions = (n, { answer, nb, rankAsked }) => {
|
|
28
|
+
const propositions = [];
|
|
29
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
30
|
+
const nbString = nb.toString();
|
|
31
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, nbString[nbString.length - rankAsked - 1]);
|
|
32
|
+
for (let i = 0; i < nbString.length; i++) {
|
|
33
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, nbString.substring(0, nbString.length - i));
|
|
34
|
+
}
|
|
35
|
+
while (propositions.length < n) {
|
|
36
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 100) + "");
|
|
37
|
+
}
|
|
38
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
39
|
+
};
|
|
40
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
41
|
+
return ans === answer;
|
|
42
|
+
};
|
|
43
|
+
exports.digitRankNumber = {
|
|
44
|
+
id: "digitRankNumber",
|
|
45
|
+
connector: "=",
|
|
46
|
+
label: "Déterminer le rang d'un chiffre dans un nombre entier",
|
|
47
|
+
levels: [],
|
|
48
|
+
isSingleStep: true,
|
|
49
|
+
sections: [],
|
|
50
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDigitRankNumberQuestion, nb),
|
|
51
|
+
qcmTimer: 60,
|
|
52
|
+
freeTimer: 60,
|
|
53
|
+
getPropositions,
|
|
54
|
+
isAnswerValid,
|
|
55
|
+
subject: "Mathématiques",
|
|
56
|
+
hasHintAndCorrection: true,
|
|
57
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fractionAndIntegerDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0FlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAyCF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAe5D,CAAC"}
|
|
@@ -7,6 +7,7 @@ const integer_1 = require("../../../../math/numbers/integer/integer");
|
|
|
7
7
|
const rational_1 = require("../../../../math/numbers/rationals/rational");
|
|
8
8
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
9
|
const divideNode_1 = require("../../../../tree/nodes/operators/divideNode");
|
|
10
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
11
|
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
11
12
|
const getFractionAndIntegerDivision = () => {
|
|
12
13
|
const rational = rational_1.RationalConstructor.randomIrreductible();
|
|
@@ -21,11 +22,43 @@ const getFractionAndIntegerDivision = () => {
|
|
|
21
22
|
? integer.divide(rational).toTree()
|
|
22
23
|
: rational.divide(integer).toTree();
|
|
23
24
|
const answerTex = answerTree.toTex();
|
|
25
|
+
const beforeSimplification = integerFirst
|
|
26
|
+
? new rational_1.Rational(integer.value * rational.denum, rational.num)
|
|
27
|
+
: new rational_1.Rational(rational.num, rational.denum * integer.value);
|
|
24
28
|
const question = {
|
|
25
29
|
instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
|
|
26
30
|
startStatement: statementTree.toTex(),
|
|
27
31
|
answer: answerTex,
|
|
28
32
|
keys: [],
|
|
33
|
+
hint: "Pour diviser une fraction par un nombre entier, on peut écrire le nombre entier sous forme de fraction. Puis, on multiplie la première fraction par l'inverse de la seconde. Enfin, on simplife la fraction obtenue si possible.",
|
|
34
|
+
correction: `
|
|
35
|
+
On écrit $${integer.value}$ sous forme de fraction :
|
|
36
|
+
|
|
37
|
+
$${integer.value} = \\frac{${integer.value}}{1}$
|
|
38
|
+
|
|
39
|
+
On multiplie la première fraction par l'inverse de la seconde :
|
|
40
|
+
|
|
41
|
+
${integerFirst
|
|
42
|
+
? `$\\frac{${integer.value}}{1}\\div ${rational
|
|
43
|
+
.toTree()
|
|
44
|
+
.toTex()} = \\frac{${integer.value}}{1} \\times ${rational
|
|
45
|
+
.reverse(false)
|
|
46
|
+
.toTree()
|
|
47
|
+
.toTex()} = \\frac{${new multiplyNode_1.MultiplyNode(integer.toTree(), rational.denum.toTree()).toTex({ forceNoSimplification: true })}}{${new multiplyNode_1.MultiplyNode((1).toTree(), rational.num.toTree()).toTex({ forceNoSimplification: true })}}
|
|
48
|
+
= ${beforeSimplification.toTree().toTex()}$`
|
|
49
|
+
: `$${rational.toTree().toTex()}\\div \\frac{${integer.value}}{1} = ${rational.toTree().toTex()}\\times \\frac{1}{${integer.value}} = \\frac{${rational.num}\\times 1}{${new multiplyNode_1.MultiplyNode(rational.denum.toTree(), integer.toTree()).toTex({ forceNoSimplification: true })}} = ${beforeSimplification
|
|
50
|
+
.toTree()
|
|
51
|
+
.toTex()}$`}
|
|
52
|
+
|
|
53
|
+
${!beforeSimplification.isIrreductible()
|
|
54
|
+
? `On peut alors simplifier cette fraction :
|
|
55
|
+
|
|
56
|
+
$${beforeSimplification.toTree().toTex()} = ${answerTex}$
|
|
57
|
+
`
|
|
58
|
+
: "Cette fraction est déjà irréductible."}
|
|
59
|
+
|
|
60
|
+
Ainsi, le résultat attendu est $${answerTex}$.
|
|
61
|
+
`,
|
|
29
62
|
answerFormat: "tex",
|
|
30
63
|
identifiers: {
|
|
31
64
|
integerFirst,
|
|
@@ -75,4 +108,5 @@ exports.fractionAndIntegerDivision = {
|
|
|
75
108
|
getPropositions,
|
|
76
109
|
isAnswerValid,
|
|
77
110
|
subject: "Mathématiques",
|
|
111
|
+
hasHintAndCorrection: true,
|
|
78
112
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fractionAndIntegerProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionAndIntegerProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA2DlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC5B,CAAC;AAsCF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAe3D,CAAC"}
|
|
@@ -15,12 +15,28 @@ const getFractionAndIntegerProduct = () => {
|
|
|
15
15
|
statementTree.shuffle();
|
|
16
16
|
const answerTree = rational.multiply(integer).toTree();
|
|
17
17
|
const answer = answerTree.toTex();
|
|
18
|
+
const beforeSimplification = new rational_1.Rational(rational.num * integer.value, rational.denum);
|
|
18
19
|
const question = {
|
|
19
20
|
instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
|
|
20
21
|
startStatement: statementTree.toTex(),
|
|
21
22
|
answer,
|
|
22
23
|
keys: [],
|
|
23
24
|
answerFormat: "tex",
|
|
25
|
+
hint: "Pour multiplier une fraction par un nombre entier, on multiplie le numérateur de la fraction par le nombre entier, sans toucher au dénominateur. On simplifie ensuite la fraction obtenue si possible.",
|
|
26
|
+
correction: `
|
|
27
|
+
On multiplie le numérateur de la fraction par le nombre entier :
|
|
28
|
+
|
|
29
|
+
$${statementTree.toTex()} = \\frac{${new multiplyNode_1.MultiplyNode(rational.num.toTree(), integer.toTree()).toTex({ forceNoSimplification: true })}}{${rational.denum}} = ${beforeSimplification.toTree().toTex()}$
|
|
30
|
+
|
|
31
|
+
${!beforeSimplification.isIrreductible()
|
|
32
|
+
? `On peut alors simplifier cette fraction :
|
|
33
|
+
|
|
34
|
+
$${beforeSimplification.toTree().toTex()} = ${answer}$
|
|
35
|
+
`
|
|
36
|
+
: "Cette fraction est déjà irréductible."}
|
|
37
|
+
|
|
38
|
+
Ainsi, le résultat attendu est $${answer}$.
|
|
39
|
+
`,
|
|
24
40
|
identifiers: {
|
|
25
41
|
integer: integer.value,
|
|
26
42
|
rational: [rational.num, rational.denum],
|
|
@@ -65,5 +81,6 @@ exports.fractionAndIntegerProduct = {
|
|
|
65
81
|
freeTimer: 60,
|
|
66
82
|
getPropositions,
|
|
67
83
|
isAnswerValid,
|
|
84
|
+
hasHintAndCorrection: true,
|
|
68
85
|
subject: "Mathématiques",
|
|
69
86
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fractionsDivision.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsDivision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AA0DlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AAwCF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAcnD,CAAC"}
|
|
@@ -12,12 +12,34 @@ const getFractionsDivision = () => {
|
|
|
12
12
|
const statementTree = new divideNode_1.DivideNode(rational.toTree(), rational2.toTree());
|
|
13
13
|
const answerTree = rational.divide(rational2).toTree();
|
|
14
14
|
const answer = answerTree.toTex();
|
|
15
|
+
const beforeSimplification = new rational_1.Rational(rational.num * rational2.denum, rational.denum * rational2.num);
|
|
16
|
+
const isSimplifiable = !beforeSimplification.isIrreductible();
|
|
15
17
|
const question = {
|
|
16
18
|
instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
|
|
17
19
|
startStatement: statementTree.toTex(),
|
|
18
20
|
answer,
|
|
19
21
|
keys: [],
|
|
20
22
|
answerFormat: "tex",
|
|
23
|
+
hint: "Pour diviser par une fraction, il faut multiplier la première fraction par l'inverse de la deuxième. Simplifie ensuite la fraction obtenue si nécessaire.",
|
|
24
|
+
correction: `On multiplie la première fraction par l'inverse de la deuxième :
|
|
25
|
+
|
|
26
|
+
$$${statementTree.toTex()} = ${rational.toTree().toTex()}\\times ${rational2
|
|
27
|
+
.reverse(false)
|
|
28
|
+
.toTree()
|
|
29
|
+
.toTex()}$$
|
|
30
|
+
|
|
31
|
+
Multiplions les fractions :
|
|
32
|
+
|
|
33
|
+
$$\\frac{${rational.num}\\times${rational2.denum}}{${rational.denum}\\times${rational2.num}} = ${beforeSimplification.toTree().toTex()}$$
|
|
34
|
+
|
|
35
|
+
${isSimplifiable
|
|
36
|
+
? `On peut alors simplifier cette fraction :
|
|
37
|
+
|
|
38
|
+
$${beforeSimplification.toTree().toTex()} = ${answer}$`
|
|
39
|
+
: "Cette fraction est déjà sous forme irréductible."}
|
|
40
|
+
|
|
41
|
+
Ainsi, le résultat attendu est $${answer}$.
|
|
42
|
+
`,
|
|
21
43
|
identifiers: {
|
|
22
44
|
rationalNum: [rational.num, rational.denum],
|
|
23
45
|
rationalDenum: [rational2.num, rational2.denum],
|
|
@@ -60,4 +82,5 @@ exports.fractionsDivision = {
|
|
|
60
82
|
getPropositions,
|
|
61
83
|
isAnswerValid,
|
|
62
84
|
subject: "Mathématiques",
|
|
85
|
+
hasHintAndCorrection: true,
|
|
63
86
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;
|
|
1
|
+
{"version":3,"file":"fractionsProduct.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/fractionsProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACjC,CAAC;AA0EF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAclD,CAAC"}
|
|
@@ -12,6 +12,7 @@ const getFractionsProduct = () => {
|
|
|
12
12
|
const statementTree = new multiplyNode_1.MultiplyNode(rational.toTree(), rational2.toTree());
|
|
13
13
|
const answerTree = rational.multiply(rational2).toTree();
|
|
14
14
|
const answer = answerTree.toTex();
|
|
15
|
+
const beforeSimplification = new rational_1.Rational(rational.num * rational2.num, rational.denum * rational2.denum);
|
|
15
16
|
const question = {
|
|
16
17
|
instruction: `Calculer et donner le résultat sous la forme d'une fraction irréductible : $${statementTree.toTex()}$`,
|
|
17
18
|
startStatement: statementTree.toTex(),
|
|
@@ -22,6 +23,19 @@ const getFractionsProduct = () => {
|
|
|
22
23
|
rationalNum: [rational.num, rational.denum],
|
|
23
24
|
rationalDenum: [rational2.num, rational2.denum],
|
|
24
25
|
},
|
|
26
|
+
hint: "Pour multiplier deux fractions, on multiplie les numérateurs entre eux et les dénominateurs entre eux, puis on simplifie la fraction obtenue si nécessaire.",
|
|
27
|
+
correction: `On multiplie les numérateurs entre eux et les dénominateurs entre eux :
|
|
28
|
+
|
|
29
|
+
$$\\frac{${rational.num}\\times${rational2.num}}{${rational.denum}\\times${rational2.denum}} = ${beforeSimplification.toTree().toTex()}$$
|
|
30
|
+
|
|
31
|
+
${!beforeSimplification.isIrreductible()
|
|
32
|
+
? `On peut alors simplifier cette fraction :
|
|
33
|
+
|
|
34
|
+
$${beforeSimplification.toTree().toTex()} = ${answer}$`
|
|
35
|
+
: "Cette fraction est déjà sous forme irréductible."}
|
|
36
|
+
|
|
37
|
+
Ainsi, le résultat attendu est $${answer}$.
|
|
38
|
+
`,
|
|
25
39
|
};
|
|
26
40
|
return question;
|
|
27
41
|
};
|
|
@@ -58,4 +72,5 @@ exports.fractionsProduct = {
|
|
|
58
72
|
getPropositions,
|
|
59
73
|
isAnswerValid,
|
|
60
74
|
subject: "Mathématiques",
|
|
75
|
+
hasHintAndCorrection: true,
|
|
61
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
@@ -16,3 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./proportionalityTable"), exports);
|
|
18
18
|
__exportStar(require("./proportionalityTableCoefficient"), exports);
|
|
19
|
+
__exportStar(require("./scaleCalculation"), exports);
|
|
20
|
+
__exportStar(require("./scaleUsage"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
scale: number;
|
|
4
|
+
isSmallScale: boolean;
|
|
5
|
+
fakeDistance: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const scaleCalculation: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=scaleCalculation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaleCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/scaleCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IAEtB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAmFF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scaleCalculation = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const rational_1 = require("../../../../math/numbers/rationals/rational");
|
|
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 coinFlip_1 = require("../../../../utils/coinFlip");
|
|
11
|
+
const getScaleCalculationQuestion = () => {
|
|
12
|
+
const isSmallScale = (0, coinFlip_1.coinFlip)();
|
|
13
|
+
const scale = isSmallScale ? (0, randint_1.randint)(1, 5) * 10 : (0, randint_1.randint)(5, 100) * 1000;
|
|
14
|
+
const realUnit = isSmallScale ? distanceUnits_1.DistanceUnit.m : distanceUnits_1.DistanceUnit.km;
|
|
15
|
+
const cm = distanceUnits_1.DistanceUnit.cm;
|
|
16
|
+
const fakeDistanceNb = isSmallScale ? (0, randint_1.randint)(5, 100) : (0, randint_1.randint)(1, 100);
|
|
17
|
+
const fakeDistance = new measure_1.Measure(fakeDistanceNb, 0, cm);
|
|
18
|
+
const realDistanceNb = (scale * fakeDistance.evaluate()) / (isSmallScale ? 100 : 100000);
|
|
19
|
+
const realDistance = new measure_1.Measure(realDistanceNb, 0, realUnit);
|
|
20
|
+
const instruction = isSmallScale
|
|
21
|
+
? `Un bateau de $${realDistance.toTex({
|
|
22
|
+
notScientific: true,
|
|
23
|
+
})}$ est représenté par un modèle réduit de $${fakeDistance.toTex({
|
|
24
|
+
notScientific: true,
|
|
25
|
+
})}$. Quelle est l'échelle du modèle réduit ?`
|
|
26
|
+
: `La distance entre deux villes est de $${realDistance.toTex({
|
|
27
|
+
notScientific: true,
|
|
28
|
+
})}$. Sur une carte, cette distance mesure $${fakeDistance.toTex({
|
|
29
|
+
notScientific: true,
|
|
30
|
+
})}$. Quelle est l'échelle de la carte ?`;
|
|
31
|
+
const answer = new rational_1.Rational(1, scale).toTex();
|
|
32
|
+
const question = {
|
|
33
|
+
answer,
|
|
34
|
+
instruction,
|
|
35
|
+
keys: [],
|
|
36
|
+
answerFormat: "tex",
|
|
37
|
+
hint: `Convertis les longueurs en $${cm.toTex()}$, puis fais un calcul de propotionnalité.`,
|
|
38
|
+
correction: `On convertit d'abord les longueurs en cm :
|
|
39
|
+
|
|
40
|
+
$${realDistance.toTex({ notScientific: true })} = ${realDistance
|
|
41
|
+
.convert("cm")
|
|
42
|
+
.toTex({ notScientific: true })}$
|
|
43
|
+
|
|
44
|
+
Puis, on fait un calcul de proportionnalité : puisque $${fakeDistance.toTex({
|
|
45
|
+
notScientific: true,
|
|
46
|
+
})}$ représentent $${realDistance.convert("cm").toTex({
|
|
47
|
+
notScientific: true,
|
|
48
|
+
})}$ réels, alors $1${cm.toTex()}$ représente $\\frac{${realDistance
|
|
49
|
+
.convert("cm")
|
|
50
|
+
.toTex({ notScientific: true, hideUnit: true })}}{${fakeDistance.toTex({
|
|
51
|
+
notScientific: true,
|
|
52
|
+
hideUnit: true,
|
|
53
|
+
})}}=${scale}${cm.toTex()}$ réels.
|
|
54
|
+
|
|
55
|
+
L'échelle est donc de $${answer}$.
|
|
56
|
+
`,
|
|
57
|
+
identifiers: {
|
|
58
|
+
scale,
|
|
59
|
+
fakeDistance: fakeDistanceNb,
|
|
60
|
+
isSmallScale,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
return question;
|
|
64
|
+
};
|
|
65
|
+
const getPropositions = (n, { answer, scale, isSmallScale }) => {
|
|
66
|
+
const propositions = [];
|
|
67
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
68
|
+
while (propositions.length < n) {
|
|
69
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new rational_1.Rational(1, isSmallScale ? (0, randint_1.randint)(1, 5) * 10 : (0, randint_1.randint)(5, 100) * 1000).toTex());
|
|
70
|
+
}
|
|
71
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
72
|
+
};
|
|
73
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
74
|
+
return ans === answer;
|
|
75
|
+
};
|
|
76
|
+
exports.scaleCalculation = {
|
|
77
|
+
id: "scaleCalculation",
|
|
78
|
+
connector: "=",
|
|
79
|
+
label: "Calculer une échelle",
|
|
80
|
+
levels: [],
|
|
81
|
+
isSingleStep: true,
|
|
82
|
+
sections: [],
|
|
83
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScaleCalculationQuestion, nb),
|
|
84
|
+
qcmTimer: 60,
|
|
85
|
+
freeTimer: 60,
|
|
86
|
+
getPropositions,
|
|
87
|
+
isAnswerValid,
|
|
88
|
+
subject: "Mathématiques",
|
|
89
|
+
hasHintAndCorrection: true,
|
|
90
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
scale: number;
|
|
4
|
+
isSmallScale: boolean;
|
|
5
|
+
fakeDistance: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const scaleUsage: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=scaleUsage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaleUsage.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/proportionality/scaleUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,OAAO,CAAC;IAEtB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAiGF,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,WAAW,CAc5C,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.scaleUsage = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const rational_1 = require("../../../../math/numbers/rationals/rational");
|
|
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 multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
|
+
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
12
|
+
const getScaleUsageQuestion = () => {
|
|
13
|
+
const isSmallScale = (0, coinFlip_1.coinFlip)();
|
|
14
|
+
const isFakeAsked = (0, coinFlip_1.coinFlip)();
|
|
15
|
+
const scale = isSmallScale ? (0, randint_1.randint)(1, 5) * 10 : (0, randint_1.randint)(5, 100) * 1000;
|
|
16
|
+
const realUnit = isSmallScale ? distanceUnits_1.DistanceUnit.m : distanceUnits_1.DistanceUnit.km;
|
|
17
|
+
const cm = distanceUnits_1.DistanceUnit.cm;
|
|
18
|
+
const fakeDistanceNb = isSmallScale ? (0, randint_1.randint)(5, 100) : (0, randint_1.randint)(1, 100);
|
|
19
|
+
const fakeDistance = new measure_1.Measure(fakeDistanceNb, 0, cm);
|
|
20
|
+
const realDistanceNb = (scale * fakeDistance.evaluate()) / (isSmallScale ? 100 : 100000);
|
|
21
|
+
const realDistance = new measure_1.Measure(realDistanceNb, 0, realUnit);
|
|
22
|
+
const scaleFrac = new rational_1.Rational(1, scale).toTex();
|
|
23
|
+
const answer = (isFakeAsked ? fakeDistanceNb : realDistanceNb).frenchify();
|
|
24
|
+
const instruction = `Une carte est à l'échelle $${scaleFrac}$. ${!isFakeAsked
|
|
25
|
+
? `Quelle est la distance réelle représentée par $${fakeDistance.toTex({
|
|
26
|
+
notScientific: true,
|
|
27
|
+
})}$ sur cette carte ? Donner la réponse en $${realUnit.toTex()}$.`
|
|
28
|
+
: `Quelle est la distance représentée sur la carte pour une distance réelle de $${realDistance.toTex({ notScientific: true })}$ ? Donner la distance en $${cm.toTex()}$.`}`;
|
|
29
|
+
const question = {
|
|
30
|
+
answer,
|
|
31
|
+
instruction,
|
|
32
|
+
keys: [],
|
|
33
|
+
answerFormat: "tex",
|
|
34
|
+
hint: `La carte est à l'échelle $${scaleFrac}$ : cela signifie que $1${cm.toTex()}$ sur cette carte représente $${scale}${cm.toTex()}$ dans la réalité. Il faut donc faire un calcul de proportionnalité.`,
|
|
35
|
+
correction: `La carte est à l'échelle $${scaleFrac}$ : cela signifie que $1${cm.toTex()}$ sur cette carte représente $${scale}${cm.toTex()}$ dans la réalité.
|
|
36
|
+
|
|
37
|
+
${isFakeAsked
|
|
38
|
+
? `
|
|
39
|
+
On convertit d'abord la distance réelle en $${cm.toTex()}$ :
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
$${realDistance.toTex({ notScientific: true })} = ${realDistance
|
|
43
|
+
.convert("cm")
|
|
44
|
+
.toTex({ notScientific: true })}$
|
|
45
|
+
|
|
46
|
+
Ainsi, $${realDistance.toTex({
|
|
47
|
+
notScientific: true,
|
|
48
|
+
})}$ dans la réalité représentent $\\frac{
|
|
49
|
+
${realDistance.convert("cm").toTex({
|
|
50
|
+
notScientific: true,
|
|
51
|
+
})}}{${scale}} = ${fakeDistance.toTex({
|
|
52
|
+
notScientific: true,
|
|
53
|
+
})}$ sur la carte.`
|
|
54
|
+
: `
|
|
55
|
+
Donc, $${fakeDistance.toTex({
|
|
56
|
+
notScientific: true,
|
|
57
|
+
})}$ sur la carte représentent $${new multiplyNode_1.MultiplyNode(fakeDistanceNb.toTree(), scale.toTree()).toTex()} = ${realDistance.convert("cm").toTex({
|
|
58
|
+
notScientific: true,
|
|
59
|
+
})}$ dans la réalité. On convertit alors en $${realUnit.toTex()}$ : la distance réelle est donc $${answer}${realUnit.toTex()}$.`}
|
|
60
|
+
|
|
61
|
+
`,
|
|
62
|
+
identifiers: {
|
|
63
|
+
scale,
|
|
64
|
+
fakeDistance: fakeDistanceNb,
|
|
65
|
+
isSmallScale,
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
return question;
|
|
69
|
+
};
|
|
70
|
+
const getPropositions = (n, { answer, scale, isSmallScale }) => {
|
|
71
|
+
const propositions = [];
|
|
72
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
73
|
+
while (propositions.length < n) {
|
|
74
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new rational_1.Rational(1, isSmallScale ? (0, randint_1.randint)(1, 5) * 10 : (0, randint_1.randint)(5, 100) * 1000).toTex());
|
|
75
|
+
}
|
|
76
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
77
|
+
};
|
|
78
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
79
|
+
return ans === answer;
|
|
80
|
+
};
|
|
81
|
+
exports.scaleUsage = {
|
|
82
|
+
id: "scaleUsage",
|
|
83
|
+
connector: "=",
|
|
84
|
+
label: "Utiliser une échelle",
|
|
85
|
+
levels: [],
|
|
86
|
+
isSingleStep: true,
|
|
87
|
+
sections: [],
|
|
88
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getScaleUsageQuestion, nb),
|
|
89
|
+
qcmTimer: 60,
|
|
90
|
+
freeTimer: 60,
|
|
91
|
+
getPropositions,
|
|
92
|
+
isAnswerValid,
|
|
93
|
+
subject: "Mathématiques",
|
|
94
|
+
hasHintAndCorrection: true,
|
|
95
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAuElC,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgDF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,CAe7C,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAejD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAkB9C,CAAC"}
|