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
|
@@ -10,6 +10,8 @@ const shuffle_1 = require("../../../../utils/shuffle");
|
|
|
10
10
|
/**
|
|
11
11
|
* arrondi à l'unité
|
|
12
12
|
*/
|
|
13
|
+
const ranks = ["unité", "dixième", "centième", "millième", "dix millième"];
|
|
14
|
+
const ranksWithAu = ["à l'unité", "au dixième", "au centième", "au millième"];
|
|
13
15
|
const instructions = [
|
|
14
16
|
"Arrondir à l'unité :",
|
|
15
17
|
"Arrondir au dixième :",
|
|
@@ -22,6 +24,7 @@ const getRoundQuestions = (opts) => {
|
|
|
22
24
|
const dec = decimal_1.DecimalConstructor.random(0, 1000, precision);
|
|
23
25
|
const decTex = dec.toTree().toTex();
|
|
24
26
|
const answer = dec.round(precisionAsked).toTree().toTex();
|
|
27
|
+
const figureToLookAt = dec.getDigitAtRank(-(precisionAsked + 1));
|
|
25
28
|
const question = {
|
|
26
29
|
instruction: `${instructions[precisionAsked]} $${decTex}$`,
|
|
27
30
|
startStatement: decTex,
|
|
@@ -33,6 +36,16 @@ const getRoundQuestions = (opts) => {
|
|
|
33
36
|
decimal: dec.value,
|
|
34
37
|
precision,
|
|
35
38
|
},
|
|
39
|
+
hint: `Pour arrondir ${ranksWithAu[precisionAsked]}, on regarde le chiffre des ${ranks[precisionAsked + 1]}s. S'il est inférieur à $5$, on arrondit ${ranksWithAu[precisionAsked]} inférieur. S'il est supérieur à $5$, on arrondit ${ranksWithAu[precisionAsked]} supérieur.`,
|
|
40
|
+
correction: `Le chiffre des ${ranks[precisionAsked + 1]}s est $${figureToLookAt}$.
|
|
41
|
+
|
|
42
|
+
${figureToLookAt < 5
|
|
43
|
+
? `Puisque ${figureToLookAt} est inférieur à 5, on arrondit ${ranksWithAu[precisionAsked]} inférieur.
|
|
44
|
+
|
|
45
|
+
Ainsi, en arrondissant ${ranksWithAu[precisionAsked]}, on a $${decTex} \\approx ${answer}$`
|
|
46
|
+
: `Puisque ${figureToLookAt} est supérieur à 5, on arrondit ${ranksWithAu[precisionAsked]} supérieur.
|
|
47
|
+
|
|
48
|
+
Ainsi, en arrondissant ${ranksWithAu[precisionAsked]}, on a $${decTex} \\approx ${answer}$`}`,
|
|
36
49
|
};
|
|
37
50
|
return question;
|
|
38
51
|
};
|
|
@@ -78,6 +91,7 @@ exports.roundToUnit = {
|
|
|
78
91
|
getPropositions,
|
|
79
92
|
isAnswerValid,
|
|
80
93
|
subject: "Mathématiques",
|
|
94
|
+
hasHintAndCorrection: true,
|
|
81
95
|
};
|
|
82
96
|
/**
|
|
83
97
|
* arrondi à l'unité
|
|
@@ -95,6 +109,7 @@ exports.roundToDixieme = {
|
|
|
95
109
|
getPropositions,
|
|
96
110
|
isAnswerValid,
|
|
97
111
|
subject: "Mathématiques",
|
|
112
|
+
hasHintAndCorrection: true,
|
|
98
113
|
};
|
|
99
114
|
/**
|
|
100
115
|
* arrondi à l'unité
|
|
@@ -112,6 +127,7 @@ exports.roundToCentieme = {
|
|
|
112
127
|
getPropositions,
|
|
113
128
|
isAnswerValid,
|
|
114
129
|
subject: "Mathématiques",
|
|
130
|
+
hasHintAndCorrection: true,
|
|
115
131
|
};
|
|
116
132
|
/**
|
|
117
133
|
* arrondi à l'unité
|
|
@@ -129,6 +145,7 @@ exports.roundToMillieme = {
|
|
|
129
145
|
getPropositions,
|
|
130
146
|
isAnswerValid,
|
|
131
147
|
subject: "Mathématiques",
|
|
148
|
+
hasHintAndCorrection: true,
|
|
132
149
|
};
|
|
133
150
|
exports.allRoundings = {
|
|
134
151
|
id: "allRoundings",
|
|
@@ -143,4 +160,5 @@ exports.allRoundings = {
|
|
|
143
160
|
getPropositions,
|
|
144
161
|
isAnswerValid,
|
|
145
162
|
subject: "Mathématiques",
|
|
163
|
+
hasHintAndCorrection: true,
|
|
146
164
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allIdentities.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/allIdentities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AA6DF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"allIdentities.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/allIdentities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAKT,MAAM,0BAA0B,CAAC;AAkBlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B,CAAC;AA6DF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonicalFormDevelopment.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAsDF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAe1D,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.canonicalFormDevelopment = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
|
+
const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
8
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
9
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
const getCanonicalFormDevelopmentQuestion = () => {
|
|
11
|
+
const trinom = trinom_1.TrinomConstructor.randomCanonical();
|
|
12
|
+
const answer = trinom.toTree().toTex();
|
|
13
|
+
const cano = trinom.getCanonicalForm();
|
|
14
|
+
const a = trinom.a;
|
|
15
|
+
const alpha = trinom.getAlpha();
|
|
16
|
+
const beta = trinom.getBeta();
|
|
17
|
+
const question = {
|
|
18
|
+
answer,
|
|
19
|
+
instruction: `Développer et réduire : $${cano.toTex()}$`,
|
|
20
|
+
keys: ["x"],
|
|
21
|
+
answerFormat: "tex",
|
|
22
|
+
identifiers: { coeffs: trinom.coefficients },
|
|
23
|
+
hint: "Développe d'abord le terme qui est au carré en te servant d'une identité remarquable.",
|
|
24
|
+
correction: `
|
|
25
|
+
$${cano.toTex()}$
|
|
26
|
+
|
|
27
|
+
$= ${new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(a.toTree(), new affine_1.Affine(1, -alpha).square().toTree()), beta.toTree()).toTex()}$
|
|
28
|
+
|
|
29
|
+
$= ${answer}$
|
|
30
|
+
`,
|
|
31
|
+
};
|
|
32
|
+
return question;
|
|
33
|
+
};
|
|
34
|
+
const getPropositions = (n, { answer }) => {
|
|
35
|
+
const propositions = [];
|
|
36
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
37
|
+
while (propositions.length < n) {
|
|
38
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, trinom_1.TrinomConstructor.random({ min: -100, max: 100 }, { min: -100, max: 100 }, { min: -100, max: 100 }).toTex());
|
|
39
|
+
}
|
|
40
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
41
|
+
};
|
|
42
|
+
const isAnswerValid = (ans, { answer, coeffs }) => {
|
|
43
|
+
const trinom = trinom_1.TrinomConstructor.fromCoeffs(coeffs);
|
|
44
|
+
return trinom.toTree().toAllValidTexs().includes(ans);
|
|
45
|
+
};
|
|
46
|
+
exports.canonicalFormDevelopment = {
|
|
47
|
+
id: "canonicalFormDevelopment",
|
|
48
|
+
connector: "=",
|
|
49
|
+
label: "Développer une forme canonique $a(x-\\alpha)^2 + \\beta$",
|
|
50
|
+
levels: [],
|
|
51
|
+
isSingleStep: true,
|
|
52
|
+
sections: [],
|
|
53
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCanonicalFormDevelopmentQuestion, nb),
|
|
54
|
+
qcmTimer: 60,
|
|
55
|
+
freeTimer: 60,
|
|
56
|
+
getPropositions,
|
|
57
|
+
isAnswerValid,
|
|
58
|
+
subject: "Mathématiques",
|
|
59
|
+
hasHintAndCorrection: true,
|
|
60
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"doubleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA0GF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}
|
|
@@ -5,7 +5,10 @@ const exercise_1 = require("../../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
7
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
8
9
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
const operatorComposition_1 = require("../../../../tree/utilities/operatorComposition");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
9
12
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
10
13
|
const getDoubleDistributivityQuestion = () => {
|
|
11
14
|
const affines = affine_1.AffineConstructor.differentRandoms(2, undefined, {
|
|
@@ -13,8 +16,21 @@ const getDoubleDistributivityQuestion = () => {
|
|
|
13
16
|
});
|
|
14
17
|
const statementTree = new multiplyNode_1.MultiplyNode(affines[0].toTree(), affines[1].toTree());
|
|
15
18
|
const answer = affines[0].multiply(affines[1]).toTree().toTex();
|
|
19
|
+
const subTerms = [
|
|
20
|
+
new multiplyNode_1.MultiplyNode(affines[0].a.toTree(), "x".toTree()),
|
|
21
|
+
affines[0].b.toTree(),
|
|
22
|
+
new multiplyNode_1.MultiplyNode(affines[1].a.toTree(), "x".toTree()),
|
|
23
|
+
affines[1].b.toTree(),
|
|
24
|
+
];
|
|
25
|
+
const subMultiplications = [
|
|
26
|
+
new multiplyNode_1.MultiplyNode(subTerms[0], subTerms[2], { forceTimesSign: true }),
|
|
27
|
+
new multiplyNode_1.MultiplyNode(subTerms[0], subTerms[3], { forceTimesSign: true }),
|
|
28
|
+
new multiplyNode_1.MultiplyNode(subTerms[1], subTerms[2], { forceTimesSign: true }),
|
|
29
|
+
new multiplyNode_1.MultiplyNode(subTerms[1], subTerms[3], { forceTimesSign: true }),
|
|
30
|
+
];
|
|
31
|
+
const statementTex = statementTree.toTex();
|
|
16
32
|
const question = {
|
|
17
|
-
instruction: `Développer et réduire : $${
|
|
33
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
18
34
|
startStatement: statementTree.toTex(),
|
|
19
35
|
answer,
|
|
20
36
|
keys: ["x"],
|
|
@@ -23,6 +39,19 @@ const getDoubleDistributivityQuestion = () => {
|
|
|
23
39
|
affine1Coeffs: affines[0].coefficients,
|
|
24
40
|
affine2Coeffs: affines[1].coefficients,
|
|
25
41
|
},
|
|
42
|
+
hint: "Multiplie chaque terme du premier facteur par chaque terme du second facteur, puis regroupe les termes similaires.",
|
|
43
|
+
correction: `
|
|
44
|
+
${(0, alignTex_1.alignTex)([
|
|
45
|
+
[statementTex, "=", (0, operatorComposition_1.operatorComposition)(addNode_1.AddNode, subMultiplications).toTex()],
|
|
46
|
+
[
|
|
47
|
+
"",
|
|
48
|
+
"=",
|
|
49
|
+
(0, operatorComposition_1.operatorComposition)(addNode_1.AddNode, subMultiplications.map((e) => e.simplify())).toTex(),
|
|
50
|
+
],
|
|
51
|
+
["", "=", answer],
|
|
52
|
+
])}
|
|
53
|
+
|
|
54
|
+
`,
|
|
26
55
|
};
|
|
27
56
|
return question;
|
|
28
57
|
};
|
|
@@ -72,4 +101,5 @@ exports.doubleDistributivity = {
|
|
|
72
101
|
getPropositions,
|
|
73
102
|
isAnswerValid,
|
|
74
103
|
subject: "Mathématiques",
|
|
104
|
+
hasHintAndCorrection: true,
|
|
75
105
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
coeff: number;
|
|
4
|
+
affine1: number[];
|
|
5
|
+
affine2: number[];
|
|
6
|
+
};
|
|
7
|
+
export declare const doubleDistributivityWithCoeff: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=doubleDistributivityWithCoeff.d.ts.map
|
package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doubleDistributivityWithCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAuGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAgB/D,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.doubleDistributivityWithCoeff = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
|
+
const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
8
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
12
|
+
const getDoubleDistributivityWithCoeffQuestion = () => {
|
|
13
|
+
const coeff = (0, randint_1.randint)(-10, 11, [-1, 0, 1]);
|
|
14
|
+
const affine1 = affine_1.AffineConstructor.random(undefined, {
|
|
15
|
+
excludes: [0],
|
|
16
|
+
});
|
|
17
|
+
const affine2 = affine_1.AffineConstructor.random(undefined, {
|
|
18
|
+
excludes: [0],
|
|
19
|
+
});
|
|
20
|
+
const statement = new multiplyNode_1.MultiplyNode(new multiplyNode_1.MultiplyNode(coeff.toTree(), affine1.toTree()), affine2.toTree()).toTex();
|
|
21
|
+
const affine3 = affine1.times(coeff);
|
|
22
|
+
const answer = affine3.multiply(affine2).toTree().toTex();
|
|
23
|
+
const question = {
|
|
24
|
+
answer,
|
|
25
|
+
instruction: `Développer et réduire : $${statement}$`,
|
|
26
|
+
keys: ["x"],
|
|
27
|
+
answerFormat: "tex",
|
|
28
|
+
identifiers: {
|
|
29
|
+
coeff,
|
|
30
|
+
affine1: affine1.coefficients,
|
|
31
|
+
affine2: affine2.coefficients,
|
|
32
|
+
},
|
|
33
|
+
hint: `Choisis deux facteurs de ce produit et multiplie les entre eux. Puis, multiplier le résultat obtenu par le troisième terme.`,
|
|
34
|
+
correction: `On commence par multiplier les deux premiers termes entre eux :
|
|
35
|
+
|
|
36
|
+
${(0, alignTex_1.alignTex)(`${statement} = ${new multiplyNode_1.MultiplyNode(affine1.times(coeff).toTree(), affine2.toTree()).toTex()}`)}
|
|
37
|
+
|
|
38
|
+
Puis, on utilise la double distributivité :
|
|
39
|
+
|
|
40
|
+
${(0, alignTex_1.alignTex)([
|
|
41
|
+
[
|
|
42
|
+
new multiplyNode_1.MultiplyNode(affine3.toTree(), affine2.toTree()).toTex(),
|
|
43
|
+
"=",
|
|
44
|
+
new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine3.a, 0).toTree(), new affine_1.Affine(affine2.a, 0).toTree()), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine3.a, 0).toTree(), affine2.b.toTree()), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(affine3.b.toTree(), new affine_1.Affine(affine2.a, 0).toTree()), new multiplyNode_1.MultiplyNode(affine3.b.toTree(), affine2.b.toTree())))).toTex(),
|
|
45
|
+
],
|
|
46
|
+
["", "=", answer],
|
|
47
|
+
])}
|
|
48
|
+
`,
|
|
49
|
+
};
|
|
50
|
+
return question;
|
|
51
|
+
};
|
|
52
|
+
const getPropositions = (n, { answer }) => {
|
|
53
|
+
const propositions = [];
|
|
54
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
55
|
+
while (propositions.length < n) {
|
|
56
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, trinom_1.TrinomConstructor.random({ min: -100, max: 100 }, { min: -100, max: 100 }, { min: -100, max: 100 })
|
|
57
|
+
.toTree()
|
|
58
|
+
.toTex());
|
|
59
|
+
}
|
|
60
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
61
|
+
};
|
|
62
|
+
const isAnswerValid = (ans, { answer, affine1, affine2, coeff }) => {
|
|
63
|
+
const affine1Obj = affine_1.AffineConstructor.fromCoeffs(affine1);
|
|
64
|
+
const affine2Obj = affine_1.AffineConstructor.fromCoeffs(affine2);
|
|
65
|
+
const answerTree = affine1Obj.times(coeff).multiply(affine2Obj).toTree();
|
|
66
|
+
return answerTree.toAllValidTexs().includes(ans);
|
|
67
|
+
};
|
|
68
|
+
const isGGBAnswerValid = (ans, { ggbAnswer }) => {
|
|
69
|
+
throw Error("GGBVea not implemented");
|
|
70
|
+
};
|
|
71
|
+
exports.doubleDistributivityWithCoeff = {
|
|
72
|
+
id: "doubleDistributivityWithCoeff",
|
|
73
|
+
connector: "=",
|
|
74
|
+
label: "Développer une expression du type $a(bx+c)(dx+e)$",
|
|
75
|
+
levels: [],
|
|
76
|
+
isSingleStep: true,
|
|
77
|
+
sections: [],
|
|
78
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDoubleDistributivityWithCoeffQuestion, nb),
|
|
79
|
+
qcmTimer: 60,
|
|
80
|
+
freeTimer: 60,
|
|
81
|
+
getPropositions,
|
|
82
|
+
isAnswerValid,
|
|
83
|
+
isGGBAnswerValid,
|
|
84
|
+
subject: "Mathématiques",
|
|
85
|
+
hasHintAndCorrection: true,
|
|
86
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"firstIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/firstIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAqDnE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CAkClE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAKvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
|
|
@@ -6,7 +6,10 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
|
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
7
|
const polynomial_1 = require("../../../../math/polynomials/polynomial");
|
|
8
8
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
9
11
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
12
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
10
13
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
11
14
|
const getFirstIdentityQuestion = () => {
|
|
12
15
|
const affine = affine_1.AffineConstructor.random({
|
|
@@ -18,13 +21,28 @@ const getFirstIdentityQuestion = () => {
|
|
|
18
21
|
});
|
|
19
22
|
const statementTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
|
|
20
23
|
const answer = affine.multiply(affine).toTree().toTex();
|
|
24
|
+
const aMonom = new multiplyNode_1.MultiplyNode(affine.a.toTree(), "x".toTree());
|
|
25
|
+
const statementTex = statementTree.toTex();
|
|
21
26
|
const question = {
|
|
22
|
-
instruction: `Développer et réduire : $${
|
|
23
|
-
startStatement:
|
|
27
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
28
|
+
startStatement: statementTex,
|
|
24
29
|
answer,
|
|
25
30
|
keys: ["x"],
|
|
26
31
|
answerFormat: "tex",
|
|
27
32
|
identifiers: { a: affine.a, b: affine.b },
|
|
33
|
+
hint: `Utilise l'identité remarquable $(a+b)^2 = a^2 + 2ab+b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${affine.b}$`,
|
|
34
|
+
correction: `
|
|
35
|
+
On utilise l'identité remarquable $(a+b)^2 = a^2 + 2ab+b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${affine.b}$ :
|
|
36
|
+
|
|
37
|
+
${(0, alignTex_1.alignTex)([
|
|
38
|
+
[
|
|
39
|
+
statementTex,
|
|
40
|
+
"=",
|
|
41
|
+
new addNode_1.AddNode(new addNode_1.AddNode(new powerNode_1.SquareNode(aMonom), new multiplyNode_1.MultiplyNode((2).toTree(), new multiplyNode_1.MultiplyNode(aMonom, affine.b.toTree()))), new powerNode_1.SquareNode(affine.b.toTree())).toTex(),
|
|
42
|
+
],
|
|
43
|
+
["", "=", answer],
|
|
44
|
+
])}
|
|
45
|
+
`,
|
|
28
46
|
};
|
|
29
47
|
return question;
|
|
30
48
|
};
|
|
@@ -68,4 +86,5 @@ exports.firstIdentity = {
|
|
|
68
86
|
getPropositions: exports.getFirstIdentityPropositions,
|
|
69
87
|
isAnswerValid: exports.isFirstIdentityAnswerValid,
|
|
70
88
|
subject: "Mathématiques",
|
|
89
|
+
hasHintAndCorrection: true,
|
|
71
90
|
};
|
|
@@ -4,4 +4,6 @@ export { firstIdentity } from "./firstIdentity";
|
|
|
4
4
|
export { secondIdentity } from "./secondIdentity";
|
|
5
5
|
export * from "./simpleDistributivity";
|
|
6
6
|
export { thirdIdentity } from "./thirdIdentity";
|
|
7
|
+
export * from "./doubleDistributivityWithCoeff";
|
|
8
|
+
export * from "./canonicalFormDevelopment";
|
|
7
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC"}
|
|
@@ -24,3 +24,5 @@ Object.defineProperty(exports, "secondIdentity", { enumerable: true, get: functi
|
|
|
24
24
|
__exportStar(require("./simpleDistributivity"), exports);
|
|
25
25
|
var thirdIdentity_1 = require("./thirdIdentity");
|
|
26
26
|
Object.defineProperty(exports, "thirdIdentity", { enumerable: true, get: function () { return thirdIdentity_1.thirdIdentity; } });
|
|
27
|
+
__exportStar(require("./doubleDistributivityWithCoeff"), exports);
|
|
28
|
+
__exportStar(require("./canonicalFormDevelopment"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"secondIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/secondIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAgBlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,WAAW,CAiDpE,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,YAAY,CAAC,WAAW,CAqCnE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAAG,CAAC,WAAW,CAQxD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|
|
@@ -6,7 +6,11 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
|
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
7
|
const polynomial_1 = require("../../../../math/polynomials/polynomial");
|
|
8
8
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
9
11
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
12
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
13
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
10
14
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
11
15
|
const getSecondIdentityQuestion = () => {
|
|
12
16
|
const affine = affine_1.AffineConstructor.random({
|
|
@@ -18,13 +22,29 @@ const getSecondIdentityQuestion = () => {
|
|
|
18
22
|
});
|
|
19
23
|
const statementTree = new powerNode_1.PowerNode(affine.toTree(), new numberNode_1.NumberNode(2));
|
|
20
24
|
const answer = affine.multiply(affine).toTree().toTex();
|
|
25
|
+
const aMonom = new multiplyNode_1.MultiplyNode(affine.a.toTree(), "x".toTree());
|
|
26
|
+
const bPositive = -affine.b;
|
|
27
|
+
const statementTex = statementTree.toTex();
|
|
21
28
|
const question = {
|
|
22
|
-
instruction: `Développer et réduire : $${
|
|
23
|
-
startStatement:
|
|
29
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
30
|
+
startStatement: statementTex,
|
|
24
31
|
answer,
|
|
25
32
|
keys: ["x"],
|
|
26
33
|
answerFormat: "tex",
|
|
27
34
|
identifiers: { a: affine.a, b: affine.b },
|
|
35
|
+
hint: `Utilise l'identité remarquable $(a-b)^2 = a^2 - 2ab+b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$`,
|
|
36
|
+
correction: `
|
|
37
|
+
On utilise l'identité remarquable $(a-b)^2 = a^2 - 2ab+b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$ :
|
|
38
|
+
|
|
39
|
+
${(0, alignTex_1.alignTex)([
|
|
40
|
+
[
|
|
41
|
+
statementTex,
|
|
42
|
+
"=",
|
|
43
|
+
new addNode_1.AddNode(new substractNode_1.SubstractNode(new powerNode_1.SquareNode(aMonom), new multiplyNode_1.MultiplyNode((2).toTree(), new multiplyNode_1.MultiplyNode(aMonom, bPositive.toTree()))), new powerNode_1.SquareNode(bPositive.toTree())).toTex(),
|
|
44
|
+
],
|
|
45
|
+
["", "=", answer],
|
|
46
|
+
])}
|
|
47
|
+
`,
|
|
28
48
|
};
|
|
29
49
|
return question;
|
|
30
50
|
};
|
|
@@ -70,4 +90,5 @@ exports.secondIdentity = {
|
|
|
70
90
|
qcmTimer: 60,
|
|
71
91
|
freeTimer: 60,
|
|
72
92
|
subject: "Mathématiques",
|
|
93
|
+
hasHintAndCorrection: true,
|
|
73
94
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}
|
|
@@ -6,7 +6,9 @@ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQ
|
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
7
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
8
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
9
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
10
12
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
11
13
|
const getSimpleDistributivityQuestion = () => {
|
|
12
14
|
const affine = affine_1.AffineConstructor.random(undefined, {
|
|
@@ -15,13 +17,25 @@ const getSimpleDistributivityQuestion = () => {
|
|
|
15
17
|
const coeff = (0, randint_1.randint)(-10, 11, [-1, 0, 1]);
|
|
16
18
|
const statementTree = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), affine.toTree());
|
|
17
19
|
const answer = affine.times(coeff).toTree().toTex();
|
|
20
|
+
const statementTex = statementTree.toTex();
|
|
18
21
|
const question = {
|
|
19
|
-
instruction: `Développer et réduire : $${
|
|
20
|
-
startStatement:
|
|
22
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
23
|
+
startStatement: statementTex,
|
|
21
24
|
answer,
|
|
22
25
|
keys: ["x"],
|
|
23
26
|
answerFormat: "tex",
|
|
24
27
|
identifiers: { a: affine.a, b: affine.b, coeff: coeff },
|
|
28
|
+
hint: `Multiplie chaque terme dans la parenthèse par $${coeff}$.`,
|
|
29
|
+
correction: `
|
|
30
|
+
${(0, alignTex_1.alignTex)([
|
|
31
|
+
[
|
|
32
|
+
statementTex,
|
|
33
|
+
"=",
|
|
34
|
+
new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(affine.a), "x".toTree())), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new numberNode_1.NumberNode(affine.b))).toTex(),
|
|
35
|
+
],
|
|
36
|
+
["", "=", answer],
|
|
37
|
+
])}
|
|
38
|
+
`,
|
|
25
39
|
};
|
|
26
40
|
return question;
|
|
27
41
|
};
|
|
@@ -59,4 +73,5 @@ exports.simpleDistributivity = {
|
|
|
59
73
|
getPropositions,
|
|
60
74
|
isAnswerValid,
|
|
61
75
|
subject: "Mathématiques",
|
|
76
|
+
hasHintAndCorrection: true,
|
|
62
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"thirdIdentity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/thirdIdentity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAqCnE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CA2BlE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAUvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAc/C,CAAC"}
|
|
@@ -5,15 +5,21 @@ const exercise_1 = require("../../../../exercises/exercise");
|
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
7
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
8
|
+
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
9
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
10
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
8
11
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
9
12
|
const getThirdIdentityQuestion = () => {
|
|
10
13
|
const affine = affine_1.AffineConstructor.random(undefined, { excludes: [0] });
|
|
11
14
|
const affine2 = new affine_1.Affine(affine.a, -affine.b);
|
|
12
15
|
const statementTree = new multiplyNode_1.MultiplyNode(affine.toTree(), affine2.toTree());
|
|
13
16
|
const answer = affine.multiply(affine2).toTree().toTex();
|
|
17
|
+
const aMonom = new multiplyNode_1.MultiplyNode(affine.a.toTree(), "x".toTree());
|
|
18
|
+
const bPositive = Math.abs(affine.b);
|
|
19
|
+
const statementTex = statementTree.toTex();
|
|
14
20
|
const question = {
|
|
15
|
-
instruction: `Développer et réduire : $${
|
|
16
|
-
startStatement:
|
|
21
|
+
instruction: `Développer et réduire : $${statementTex}$`,
|
|
22
|
+
startStatement: statementTex,
|
|
17
23
|
answer,
|
|
18
24
|
keys: ["x"],
|
|
19
25
|
answerFormat: "tex",
|
|
@@ -21,6 +27,18 @@ const getThirdIdentityQuestion = () => {
|
|
|
21
27
|
affine1Coeffs: affine.coefficients,
|
|
22
28
|
affine2Coeffs: affine2.coefficients,
|
|
23
29
|
},
|
|
30
|
+
hint: `Utilise l'identité remarquable $(a-b)(a+b) = a^2 - b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$`,
|
|
31
|
+
correction: `
|
|
32
|
+
On utilise l'identité remarquable $(a-b)(a+b) = a^2 - b^2$ en prenant $a=${aMonom.toTex()}$ et $b=${bPositive}$ :
|
|
33
|
+
|
|
34
|
+
${(0, alignTex_1.alignTex)([
|
|
35
|
+
[
|
|
36
|
+
statementTex,
|
|
37
|
+
"=",
|
|
38
|
+
new substractNode_1.SubstractNode(new powerNode_1.SquareNode(aMonom), new powerNode_1.SquareNode(bPositive.toTree())).toTex(),
|
|
39
|
+
],
|
|
40
|
+
["", "=", answer],
|
|
41
|
+
])}`,
|
|
24
42
|
};
|
|
25
43
|
return question;
|
|
26
44
|
};
|
|
@@ -65,4 +83,5 @@ exports.thirdIdentity = {
|
|
|
65
83
|
qcmTimer: 60,
|
|
66
84
|
freeTimer: 60,
|
|
67
85
|
subject: "Mathématiques",
|
|
86
|
+
hasHintAndCorrection: true,
|
|
68
87
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0BlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;
|
|
1
|
+
{"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AA0BlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwKF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|
|
@@ -23,7 +23,7 @@ const higherFactor = (n) => {
|
|
|
23
23
|
return 1;
|
|
24
24
|
};
|
|
25
25
|
const getEquationSimpleSquare = () => {
|
|
26
|
-
let randNbr = (0, randint_1.randint)(-
|
|
26
|
+
let randNbr = (0, randint_1.randint)(-10, 101);
|
|
27
27
|
const rand = (0, diceFlip_1.diceFlip)(3);
|
|
28
28
|
if (rand === 0)
|
|
29
29
|
randNbr = (0, randint_1.randint)(-20, 0);
|
|
@@ -34,6 +34,7 @@ const getEquationSimpleSquare = () => {
|
|
|
34
34
|
const instruction = `Résoudre l'équation : $x^2 = ${randNbr}$`;
|
|
35
35
|
const sqrt = Math.sqrt(randNbr);
|
|
36
36
|
let solutionsSet;
|
|
37
|
+
let simplifiedRoot;
|
|
37
38
|
if (randNbr < 0) {
|
|
38
39
|
solutionsSet = new discreteSetNode_1.DiscreteSetNode([]);
|
|
39
40
|
}
|
|
@@ -57,6 +58,29 @@ const getEquationSimpleSquare = () => {
|
|
|
57
58
|
keys: equationKeys_1.equationKeys,
|
|
58
59
|
answerFormat: "tex",
|
|
59
60
|
identifiers: { randNbr },
|
|
61
|
+
hint: `L'équation $x^2 = k$ :
|
|
62
|
+
|
|
63
|
+
- n'admet pas de solution si $k<0$,
|
|
64
|
+
- admet une solution si $k=0$, qui est $0$
|
|
65
|
+
- admet deux solutions si $k>0$ : $-\\sqrt{k}$ et $\\sqrt{k}$
|
|
66
|
+
`,
|
|
67
|
+
correction: `
|
|
68
|
+
${randNbr < 0
|
|
69
|
+
? `L'équation $x^2 = ${randNbr}$ n'admet pas de solution, car $${randNbr}$ est négatif. Ainsi, $${answer}$.`
|
|
70
|
+
: randNbr === 0
|
|
71
|
+
? `L'équation $x^2 = 0$ admet une unique solution : $0$. En effet, $0$ est le seul nombre qui au carré est égal à $0$. Ainsi, $${answer}$.`
|
|
72
|
+
: `Puisque $${randNbr}>0$, l'équation $x^2 = ${randNbr}$ admet deux solutions : $-\\sqrt{${randNbr}}$ et $\\sqrt{${randNbr}}$.
|
|
73
|
+
|
|
74
|
+
${new real_1.SquareRoot(randNbr).isSimplifiable()
|
|
75
|
+
? `Or, $\\sqrt{${randNbr}}=${new real_1.SquareRoot(randNbr)
|
|
76
|
+
.simplify()
|
|
77
|
+
.toTree()
|
|
78
|
+
.toTex()}$.`
|
|
79
|
+
: ""}
|
|
80
|
+
|
|
81
|
+
Ainsi, $${answer}$.
|
|
82
|
+
`}
|
|
83
|
+
`,
|
|
60
84
|
};
|
|
61
85
|
return question;
|
|
62
86
|
};
|
|
@@ -138,4 +162,5 @@ exports.equationSimpleSquare = {
|
|
|
138
162
|
getPropositions,
|
|
139
163
|
isAnswerValid,
|
|
140
164
|
subject: "Mathématiques",
|
|
165
|
+
hasHintAndCorrection: true,
|
|
141
166
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType1Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"equationType1Exercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationType1Exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAalC;;GAEG;AACH,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAgEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
|