math-exercises 2.2.4 → 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 +1 -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/scaleUsage.js +1 -1
- 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.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +1 -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.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +11 -2
- 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/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/equaDiff/equaDiffGeneralForme.d.ts.map +1 -1
- package/lib/exercises/math/equaDiff/equaDiffGeneralForme.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 +1 -0
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +1 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +1 -0
- 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/titrationEquivalenceRelation.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +1 -0
- package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +1 -0
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/concentrationCalculation.js +1 -0
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +1 -0
- package/lib/exercises/pc/electricity/calculateIntensity.js +1 -1
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/calculateVoltage.js +1 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +1 -0
- package/lib/exercises/pc/electricity/ohmLaw.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/ohmLaw.js +1 -0
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +1 -0
- package/lib/exercises/pc/energy/calorificValue.d.ts.map +1 -1
- package/lib/exercises/pc/energy/calorificValue.js +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy.js +1 -0
- package/lib/exercises/pc/energy/combustionTransferEnergy2.d.ts.map +1 -1
- package/lib/exercises/pc/energy/combustionTransferEnergy2.js +1 -0
- package/lib/exercises/pc/energy/efficencyOfConverter.d.ts.map +1 -1
- package/lib/exercises/pc/energy/efficencyOfConverter.js +1 -0
- package/lib/exercises/pc/energy/efficiencyCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/efficiencyCalculation.js +1 -0
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/energy/kineticEnergyOrMassOrSpeed.js +1 -0
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +1 -0
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/calculateNormalOrFrictionForce.js +1 -0
- package/lib/exercises/pc/forces/electroStaticForce.d.ts.map +1 -1
- package/lib/exercises/pc/forces/electroStaticForce.js +1 -0
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalAttractionObjectHeight.js +1 -0
- package/lib/exercises/pc/forces/gravitationalForcePlanets.d.ts.map +1 -1
- package/lib/exercises/pc/forces/gravitationalForcePlanets.js +1 -0
- package/lib/exercises/pc/forces/massWeight.d.ts.map +1 -1
- package/lib/exercises/pc/forces/massWeight.js +1 -0
- package/lib/exercises/pc/motion/averageSpeed.d.ts.map +1 -1
- package/lib/exercises/pc/motion/averageSpeed.js +1 -0
- package/lib/exercises/pc/motion/averageSpeedCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/motion/averageSpeedCalculation.js +1 -0
- package/lib/exercises/pc/motion/motionReference.d.ts.map +1 -1
- package/lib/exercises/pc/motion/motionReference.js +1 -0
- package/lib/exercises/pc/pH.d.ts.map +1 -1
- package/lib/exercises/pc/pH.js +1 -0
- package/lib/exercises/pc/power/calculatePowerOfLight.d.ts.map +1 -1
- package/lib/exercises/pc/power/calculatePowerOfLight.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/lightDistanceConversion.d.ts.map +1 -1
- package/lib/exercises/pc/waves/lightDistanceConversion.js +1 -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.map +1 -1
- package/lib/exercises/pc/weight/calculateWeight.js +1 -0
- package/lib/exercises/pc/weight/weightOnTheMoon.d.ts.map +1 -1
- package/lib/exercises/pc/weight/weightOnTheMoon.js +1 -0
- package/lib/index.d.ts +28 -64
- 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/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 +6 -0
- 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 +1 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +8 -2
- package/lib/tree/nodes/operators/powerNode.js +1 -1
- 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
|
@@ -83,8 +83,8 @@ export interface Exercise<TIdentifiers = {}> {
|
|
|
83
83
|
isAnswerValid?: VEA<TIdentifiers>;
|
|
84
84
|
isGGBAnswerValid?: GGBVEA<TIdentifiers>;
|
|
85
85
|
hasGeogebra?: boolean;
|
|
86
|
-
hasHintAndCorrection?: boolean;
|
|
87
86
|
subject: "Mathématiques" | "Chimie" | "Physique";
|
|
87
|
+
hasHintAndCorrection?: boolean;
|
|
88
88
|
}
|
|
89
89
|
export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
|
|
90
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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],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("../../../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":"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"}
|
|
@@ -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"}
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -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
|
};
|
package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map
CHANGED
|
@@ -1 +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;
|
|
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"}
|
|
@@ -8,6 +8,7 @@ const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
|
8
8
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
9
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/alignTex");
|
|
11
12
|
const getDoubleDistributivityWithCoeffQuestion = () => {
|
|
12
13
|
const coeff = (0, randint_1.randint)(-10, 11, [-1, 0, 1]);
|
|
13
14
|
const affine1 = affine_1.AffineConstructor.random(undefined, {
|
|
@@ -32,11 +33,18 @@ const getDoubleDistributivityWithCoeffQuestion = () => {
|
|
|
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.`,
|
|
33
34
|
correction: `On commence par multiplier les deux premiers termes entre eux :
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
${(0, alignTex_1.alignTex)(`${statement} = ${new multiplyNode_1.MultiplyNode(affine1.times(coeff).toTree(), affine2.toTree()).toTex()}`)}
|
|
36
37
|
|
|
37
38
|
Puis, on utilise la double distributivité :
|
|
38
39
|
|
|
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
|
+
])}
|
|
40
48
|
`,
|
|
41
49
|
};
|
|
42
50
|
return question;
|
|
@@ -74,4 +82,5 @@ exports.doubleDistributivityWithCoeff = {
|
|
|
74
82
|
isAnswerValid,
|
|
75
83
|
isGGBAnswerValid,
|
|
76
84
|
subject: "Mathématiques",
|
|
85
|
+
hasHintAndCorrection: true,
|
|
77
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"}
|