math-exercises 3.0.66 → 3.0.68
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/math/calcul/fractions/periodicWritingToFraction.d.ts +1 -0
- package/lib/exercises/math/calcul/fractions/periodicWritingToFraction.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/periodicWritingToFraction.js +41 -20
- package/lib/exercises/math/calcul/fractions/simplifyFraction.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +4 -4
- package/lib/exercises/math/calcul/rounding/rounding.d.ts.map +1 -1
- package/lib/exercises/math/calcul/rounding/rounding.js +13 -21
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +4 -0
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistri.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistri.js +5 -6
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.js +4 -4
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +4 -4
- package/lib/exercises/math/calculLitteral/distributivity/idRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/idRmq1.js +4 -7
- package/lib/exercises/math/calculLitteral/distributivity/idRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/idRmq2.js +4 -5
- package/lib/exercises/math/calculLitteral/distributivity/idRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/idRmq3.js +4 -5
- package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.js +4 -4
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.js +4 -4
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationSimpleSquare.js +4 -6
- package/lib/exercises/math/calculLitteral/equation/equationWithDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationWithDistributivity.js +4 -3
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +4 -6
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +4 -4
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +4 -6
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType3.js +4 -4
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +4 -4
- package/lib/exercises/math/calculLitteral/factorisation/factoByX.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoByX.js +4 -4
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +4 -6
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +4 -6
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +4 -6
- package/lib/exercises/math/calculLitteral/factorisation/factoType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +4 -3
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +4 -4
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +4 -4
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType1.js +4 -7
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType2.js +4 -3
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/firstDegreeInequationsType3.js +4 -5
- package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +4 -4
- package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/distributeAndSimplify.js +4 -2
- package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/simplifying/evaluateExpression.js +4 -4
- package/lib/exercises/math/functions/variations/varTableExtremaReading.d.ts.map +1 -1
- package/lib/exercises/math/functions/variations/varTableExtremaReading.js +4 -5
- package/lib/exercises/math/geometry/angles/recognizeAngleType.d.ts.map +1 -1
- package/lib/exercises/math/geometry/angles/recognizeAngleType.js +4 -5
- package/lib/exercises/math/geometry/areas/circleRadiusFromArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/circleRadiusFromArea.js +3 -0
- package/lib/exercises/math/geometry/areas/rectangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/rectangleArea.js +4 -7
- package/lib/exercises/math/geometry/areas/rectangleSideFromArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/rectangleSideFromArea.js +4 -3
- package/lib/exercises/math/geometry/areas/rightTriangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/rightTriangleArea.js +32 -16
- package/lib/exercises/math/geometry/areas/squareSideFromArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/squareSideFromArea.js +3 -0
- package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/distanceBetweenTwoPoints.js +4 -4
- package/lib/exercises/math/geometry/cartesian/midpoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/midpoint.js +4 -4
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +25 -11
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnLine.js +4 -0
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/placeAbscissOnSemiLine.js +4 -4
- package/lib/exercises/math/geometry/cartesian/pointCoordinates.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinates.js +4 -0
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.js +4 -0
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +33 -17
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityQuadrinomialsGeo.js +4 -5
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.d.ts.map +1 -1
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +4 -3
- package/lib/exercises/math/matrices/matrixGeneralTerm.d.ts.map +1 -1
- package/lib/exercises/math/matrices/matrixGeneralTerm.js +0 -2
- package/lib/exercises/math/percent/evolutions/index.d.ts +0 -1
- package/lib/exercises/math/percent/evolutions/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/evolutions/index.js +0 -1
- package/lib/exercises/math/percent/index.d.ts +1 -0
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +1 -0
- package/lib/exercises/math/percent/interests/compoundInterest.d.ts +12 -0
- package/lib/exercises/math/percent/interests/compoundInterest.d.ts.map +1 -0
- package/lib/exercises/math/percent/interests/compoundInterest.js +127 -0
- package/lib/exercises/math/percent/interests/compoundInterestDuration.d.ts +2 -0
- package/lib/exercises/math/percent/interests/compoundInterestDuration.d.ts.map +1 -0
- package/lib/exercises/math/percent/interests/compoundInterestDuration.js +166 -0
- package/lib/exercises/math/percent/interests/compoundInterestStartValue.d.ts +12 -0
- package/lib/exercises/math/percent/interests/compoundInterestStartValue.d.ts.map +1 -0
- package/lib/exercises/math/percent/interests/compoundInterestStartValue.js +132 -0
- package/lib/exercises/math/percent/interests/index.d.ts +3 -0
- package/lib/exercises/math/percent/interests/index.d.ts.map +1 -0
- package/lib/exercises/math/percent/interests/index.js +2 -0
- package/lib/exercises/math/primitive/constantPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/constantPrimitive.js +0 -2
- package/lib/exercises/math/primitive/polynomialPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/polynomialPrimitive.js +4 -0
- package/lib/exercises/math/primitive/sinCosPrimitive.d.ts.map +1 -1
- package/lib/exercises/math/primitive/sinCosPrimitive.js +25 -12
- package/lib/exercises/math/probaStat/binomial/binomialInequation.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/binomialInequation.js +4 -3
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.js +52 -28
- package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.js +59 -39
- package/lib/exercises/math/probaStat/diceBasicProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/diceBasicProbas.js +1 -4
- package/lib/exercises/math/sequences/sequencePlot.d.ts.map +1 -1
- package/lib/exercises/math/sequences/sequencePlot.js +59 -32
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +23 -7
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +23 -8
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.d.ts +6 -1
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/calculateVolumetricMass.js +61 -27
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +28 -10
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomicStructureElement.js +43 -17
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromElectronicConfiguration.js +23 -8
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findValenceElectronsNumberFromTable.js +22 -8
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +18 -5
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts +1 -0
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/massOrVolumeProportion.js +49 -24
- package/lib/exercises/pc/chemicalElements/weightPercent.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/weightPercent.js +42 -13
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +26 -9
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +48 -15
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +22 -9
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.d.ts +1 -0
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +30 -15
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts +7 -2
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +49 -33
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts +1 -2
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/titrationEquivalenceRelation.js +104 -67
- package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +99 -82
- package/lib/exercises/pc/dosage/concentrationCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/concentrationCalculation.js +69 -40
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +78 -40
- package/lib/exercises/pc/electricity/calculateIntensity.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/calculateIntensity.js +23 -19
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/calculateIntensityInSerieOrParallel.js +51 -43
- package/lib/exercises/pc/electricity/calculateVoltage.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/calculateVoltage.js +0 -2
- package/lib/exercises/pc/electricity/electricChargeFromIntensity.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/electricChargeFromIntensity.js +19 -6
- package/lib/exercises/pc/electricity/electricEnergyFromPower.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/electricEnergyFromPower.js +16 -6
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts +1 -0
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/electricPowerOrEnergyCalculation.js +54 -24
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/kirchhoffVoltageLaw.js +44 -44
- package/lib/exercises/pc/electricity/ohmLaw.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/ohmLaw.js +67 -24
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +36 -43
- package/lib/index.d.ts +25 -6
- package/lib/index.d.ts.map +1 -1
- package/lib/latexTester.js +2 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"periodicWritingToFraction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/periodicWritingToFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"periodicWritingToFraction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/periodicWritingToFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAqGF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
|
|
@@ -8,19 +8,8 @@ import { randint } from "../../../../math/utils/random/randint.js";
|
|
|
8
8
|
* 1000x = 123,123123
|
|
9
9
|
* 999x = 123
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const periodicPart = [];
|
|
14
|
-
for (let i = 0; i < periodicPartLength; i++) {
|
|
15
|
-
periodicPart.push(randint(periodicPartLength === 1 ? 1 : 0, 10, periodicPart));
|
|
16
|
-
}
|
|
17
|
-
const num = Number("0." + periodicPart.join("")) * 10 ** periodicPartLength;
|
|
18
|
-
let denumString = "";
|
|
19
|
-
for (let i = 0; i < periodicPartLength; i++) {
|
|
20
|
-
denumString += "9";
|
|
21
|
-
}
|
|
22
|
-
const denum = Number(denumString);
|
|
23
|
-
const leadingPart = DecimalConstructor.random(0, 10, randint(0, 3));
|
|
11
|
+
const getInstruction = (identifiers) => {
|
|
12
|
+
const { num, denum, leadingPart, periodicPart } = identifiers;
|
|
24
13
|
let x = leadingPart.toTree().toTex();
|
|
25
14
|
if (!x.includes(","))
|
|
26
15
|
x += ",";
|
|
@@ -28,19 +17,52 @@ const getPeriodicWritingToFractionQuestion = () => {
|
|
|
28
17
|
x += periodicPart.join("");
|
|
29
18
|
}
|
|
30
19
|
x += "\\ldots";
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
return `Écrire sous forme de fraction :
|
|
21
|
+
|
|
22
|
+
$$
|
|
23
|
+
${x}
|
|
24
|
+
$$`;
|
|
25
|
+
};
|
|
26
|
+
const getAnswer = (identifiers) => {
|
|
27
|
+
const { num, denum, leadingPart } = identifiers;
|
|
28
|
+
const leadingPartDec = new Decimal(leadingPart);
|
|
29
|
+
const answer = new Rational(num, denum * 10 ** leadingPartDec.precision)
|
|
30
|
+
.add(leadingPartDec.toRational())
|
|
33
31
|
.toTree()
|
|
34
32
|
.toTex();
|
|
33
|
+
return answer;
|
|
34
|
+
};
|
|
35
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
35
36
|
const question = {
|
|
36
|
-
answer,
|
|
37
|
-
instruction:
|
|
37
|
+
answer: getAnswer(identifiers),
|
|
38
|
+
instruction: getInstruction(identifiers),
|
|
38
39
|
keys: [],
|
|
39
40
|
answerFormat: "tex",
|
|
40
|
-
identifiers
|
|
41
|
+
identifiers,
|
|
41
42
|
};
|
|
42
43
|
return question;
|
|
43
44
|
};
|
|
45
|
+
const getPeriodicWritingToFractionQuestion = () => {
|
|
46
|
+
const periodicPartLength = randint(1, 4);
|
|
47
|
+
const periodicPart = [];
|
|
48
|
+
for (let i = 0; i < periodicPartLength; i++) {
|
|
49
|
+
periodicPart.push(randint(periodicPartLength === 1 ? 1 : 0, 10, periodicPart));
|
|
50
|
+
}
|
|
51
|
+
const num = Number("0." + periodicPart.join("")) * 10 ** periodicPartLength;
|
|
52
|
+
let denumString = "";
|
|
53
|
+
for (let i = 0; i < periodicPartLength; i++) {
|
|
54
|
+
denumString += "9";
|
|
55
|
+
}
|
|
56
|
+
const denum = Number(denumString);
|
|
57
|
+
const leadingPart = DecimalConstructor.random(0, 10, randint(0, 3));
|
|
58
|
+
const identifiers = {
|
|
59
|
+
num,
|
|
60
|
+
denum,
|
|
61
|
+
leadingPart: leadingPart.value,
|
|
62
|
+
periodicPart,
|
|
63
|
+
};
|
|
64
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
65
|
+
};
|
|
44
66
|
const getPropositions = (n, { answer, num, denum, leadingPart }) => {
|
|
45
67
|
const propositions = [];
|
|
46
68
|
addValidProp(propositions, answer);
|
|
@@ -66,13 +88,12 @@ export const periodicWritingToFraction = {
|
|
|
66
88
|
id: "periodicWritingToFraction",
|
|
67
89
|
connector: "=",
|
|
68
90
|
label: "Passer de l'écriture décimale périodique à l'écriture fractionnaire",
|
|
69
|
-
levels: ["2nde"],
|
|
70
91
|
isSingleStep: true,
|
|
71
|
-
sections: ["Fractions"],
|
|
72
92
|
generator: (nb) => getDistinctQuestions(getPeriodicWritingToFractionQuestion, nb),
|
|
73
93
|
qcmTimer: 60,
|
|
74
94
|
freeTimer: 60,
|
|
75
95
|
getPropositions,
|
|
76
96
|
isAnswerValid,
|
|
77
97
|
subject: "Mathématiques",
|
|
98
|
+
getQuestionFromIdentifiers,
|
|
78
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simplifyFraction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/simplifyFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"simplifyFraction.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/fractions/simplifyFraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsGF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|
|
@@ -57,6 +57,9 @@ ${alignTex([
|
|
|
57
57
|
const getSimplifyFraction = () => {
|
|
58
58
|
const rational = RationalConstructor.randomSimplifiable(10);
|
|
59
59
|
const identifiers = { num: rational.num, denum: rational.denum };
|
|
60
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
61
|
+
};
|
|
62
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
60
63
|
const question = {
|
|
61
64
|
instruction: getInstruction(identifiers),
|
|
62
65
|
startStatement: getStartStatement(identifiers),
|
|
@@ -97,9 +100,6 @@ export const simplifyFraction = {
|
|
|
97
100
|
getPropositions,
|
|
98
101
|
isAnswerValid,
|
|
99
102
|
subject: "Mathématiques",
|
|
100
|
-
|
|
101
|
-
getInstruction,
|
|
102
|
-
getCorrection,
|
|
103
|
-
getHint,
|
|
103
|
+
getQuestionFromIdentifiers,
|
|
104
104
|
hasHintAndCorrection: true,
|
|
105
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"rounding.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/rounding/rounding.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAwBrC,KAAK,OAAO,GAAG;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AACF,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAuIF,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CActD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAczD,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAc1D,CAAC;AACF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAc1D,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBvD,CAAC"}
|
|
@@ -16,6 +16,10 @@ const instructions = [
|
|
|
16
16
|
"Arrondir au centième :",
|
|
17
17
|
"Arrondir au millième :",
|
|
18
18
|
];
|
|
19
|
+
const getStartStatement = (identifiers) => {
|
|
20
|
+
const dec = new Decimal(identifiers.decimal);
|
|
21
|
+
return dec.toTree().toTex();
|
|
22
|
+
};
|
|
19
23
|
const getInstruction = (identifiers, opts) => {
|
|
20
24
|
const { precisionAsked } = identifiers;
|
|
21
25
|
const dec = new Decimal(identifiers.decimal);
|
|
@@ -62,9 +66,12 @@ const getRoundQuestions = (opts) => {
|
|
|
62
66
|
decimal: dec.value,
|
|
63
67
|
precision,
|
|
64
68
|
};
|
|
69
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
70
|
+
};
|
|
71
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
65
72
|
const question = {
|
|
66
73
|
instruction: getInstruction(identifiers, opts),
|
|
67
|
-
startStatement:
|
|
74
|
+
startStatement: getStartStatement(identifiers, opts),
|
|
68
75
|
answer: getAnswer(identifiers, opts),
|
|
69
76
|
keys: [],
|
|
70
77
|
answerFormat: "tex",
|
|
@@ -112,10 +119,7 @@ export const roundToUnit = {
|
|
|
112
119
|
isAnswerValid,
|
|
113
120
|
subject: "Mathématiques",
|
|
114
121
|
hasHintAndCorrection: true,
|
|
115
|
-
|
|
116
|
-
getAnswer,
|
|
117
|
-
getCorrection,
|
|
118
|
-
getHint,
|
|
122
|
+
getQuestionFromIdentifiers,
|
|
119
123
|
};
|
|
120
124
|
/**
|
|
121
125
|
* arrondi à l'unité
|
|
@@ -132,10 +136,7 @@ export const roundToDixieme = {
|
|
|
132
136
|
isAnswerValid,
|
|
133
137
|
subject: "Mathématiques",
|
|
134
138
|
hasHintAndCorrection: true,
|
|
135
|
-
|
|
136
|
-
getAnswer,
|
|
137
|
-
getCorrection,
|
|
138
|
-
getHint,
|
|
139
|
+
getQuestionFromIdentifiers,
|
|
139
140
|
};
|
|
140
141
|
/**
|
|
141
142
|
* arrondi à l'unité
|
|
@@ -152,10 +153,7 @@ export const roundToCentieme = {
|
|
|
152
153
|
isAnswerValid,
|
|
153
154
|
subject: "Mathématiques",
|
|
154
155
|
hasHintAndCorrection: true,
|
|
155
|
-
|
|
156
|
-
getAnswer,
|
|
157
|
-
getCorrection,
|
|
158
|
-
getHint,
|
|
156
|
+
getQuestionFromIdentifiers,
|
|
159
157
|
};
|
|
160
158
|
/**
|
|
161
159
|
* arrondi à l'unité
|
|
@@ -172,10 +170,7 @@ export const roundToMillieme = {
|
|
|
172
170
|
isAnswerValid,
|
|
173
171
|
subject: "Mathématiques",
|
|
174
172
|
hasHintAndCorrection: true,
|
|
175
|
-
|
|
176
|
-
getAnswer,
|
|
177
|
-
getCorrection,
|
|
178
|
-
getHint,
|
|
173
|
+
getQuestionFromIdentifiers,
|
|
179
174
|
};
|
|
180
175
|
export const allRoundings = {
|
|
181
176
|
id: "allRoundings",
|
|
@@ -189,8 +184,5 @@ export const allRoundings = {
|
|
|
189
184
|
isAnswerValid,
|
|
190
185
|
subject: "Mathématiques",
|
|
191
186
|
hasHintAndCorrection: true,
|
|
192
|
-
|
|
193
|
-
getAnswer,
|
|
194
|
-
getCorrection,
|
|
195
|
-
getHint,
|
|
187
|
+
getQuestionFromIdentifiers,
|
|
196
188
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canonicalFormDevelopment.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"canonicalFormDevelopment.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAUrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAiGF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAoB1D,CAAC"}
|
|
@@ -47,6 +47,9 @@ ${alignTex([
|
|
|
47
47
|
const getCanonicalFormDevelopmentQuestion = () => {
|
|
48
48
|
const trinom = TrinomConstructor.randomCanonical();
|
|
49
49
|
const identifiers = { coeffs: trinom.coefficients };
|
|
50
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
51
|
+
};
|
|
52
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
50
53
|
const question = {
|
|
51
54
|
answer: getAnswer(identifiers),
|
|
52
55
|
instruction: getInstruction(identifiers),
|
|
@@ -97,4 +100,5 @@ export const canonicalFormDevelopment = {
|
|
|
97
100
|
getAnswer,
|
|
98
101
|
getHint,
|
|
99
102
|
getCorrection,
|
|
103
|
+
getQuestionFromIdentifiers,
|
|
100
104
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doubleDistri.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistri.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"doubleDistri.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistri.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAgKF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAgBtD,CAAC"}
|
|
@@ -77,14 +77,16 @@ const getDoubleDistributivityQuestion = () => {
|
|
|
77
77
|
const affines = AffineConstructor.differentRandoms(2, undefined, {
|
|
78
78
|
excludes: [0],
|
|
79
79
|
});
|
|
80
|
-
const statementTree = new MultiplyNode(affines[0].toTree(), affines[1].toTree());
|
|
81
80
|
const identifiers = {
|
|
82
81
|
affine1Coeffs: affines[0].coefficients,
|
|
83
82
|
affine2Coeffs: affines[1].coefficients,
|
|
84
83
|
};
|
|
84
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
85
|
+
};
|
|
86
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
85
87
|
const question = {
|
|
86
88
|
instruction: getInstruction(identifiers),
|
|
87
|
-
startStatement:
|
|
89
|
+
startStatement: getStartStatement(identifiers),
|
|
88
90
|
answer: getAnswer(identifiers),
|
|
89
91
|
keys: ["x"],
|
|
90
92
|
answerFormat: "tex",
|
|
@@ -148,8 +150,5 @@ export const doubleDistributivity = {
|
|
|
148
150
|
isAnswerValid,
|
|
149
151
|
subject: "Mathématiques",
|
|
150
152
|
hasHintAndCorrection: true,
|
|
151
|
-
|
|
152
|
-
getAnswer,
|
|
153
|
-
getCorrection,
|
|
154
|
-
getHint,
|
|
153
|
+
getQuestionFromIdentifiers,
|
|
155
154
|
};
|
package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doubleDistributivitySubstract.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"doubleDistributivitySubstract.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAGL,wBAAwB,EACzB,MAAM,yCAAyC,CAAC;AAQjD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,wBAAwB,CAAC;IAClC,OAAO,EAAE,wBAAwB,CAAC;IAElC,OAAO,EAAE,wBAAwB,CAAC;IAElC,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC,CAAC;AAsIF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAgB/D,CAAC"}
|
|
@@ -96,6 +96,9 @@ const getDoubleDistributivitySubstractQuestion = (ops) => {
|
|
|
96
96
|
affine3: affine3.toIdentifiers(),
|
|
97
97
|
affine4: affine4?.toIdentifiers(),
|
|
98
98
|
};
|
|
99
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
100
|
+
};
|
|
101
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
99
102
|
const question = {
|
|
100
103
|
answer: getAnswer(identifiers),
|
|
101
104
|
instruction: getInstruction(identifiers),
|
|
@@ -118,8 +121,5 @@ export const doubleDistributivitySubstract = {
|
|
|
118
121
|
getPropositions,
|
|
119
122
|
isAnswerValid,
|
|
120
123
|
subject: "Mathématiques",
|
|
121
|
-
|
|
122
|
-
// getHint,
|
|
123
|
-
// getCorrection,
|
|
124
|
-
getAnswer,
|
|
124
|
+
getQuestionFromIdentifiers,
|
|
125
125
|
};
|
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,
|
|
1
|
+
{"version":3,"file":"doubleDistributivityWithCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA+IF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
|
|
@@ -59,6 +59,9 @@ const getDoubleDistributivityWithCoeffQuestion = () => {
|
|
|
59
59
|
affine1: affine1.coefficients,
|
|
60
60
|
affine2: affine2.coefficients,
|
|
61
61
|
};
|
|
62
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
63
|
+
};
|
|
64
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
62
65
|
const question = {
|
|
63
66
|
answer: getAnswer(identifiers),
|
|
64
67
|
instruction: getInstruction(identifiers),
|
|
@@ -98,8 +101,5 @@ export const doubleDistributivityWithCoeff = {
|
|
|
98
101
|
isAnswerValid,
|
|
99
102
|
subject: "Mathématiques",
|
|
100
103
|
hasHintAndCorrection: true,
|
|
101
|
-
|
|
102
|
-
getCorrection,
|
|
103
|
-
getAnswer,
|
|
104
|
-
getInstruction,
|
|
104
|
+
getQuestionFromIdentifiers,
|
|
105
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/idRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"idRmq1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/idRmq1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2EF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAcnE,CAAC;AAkBF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CAkClE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAgBvD,CAAC;AAMF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAa/C,CAAC"}
|
|
@@ -77,6 +77,9 @@ export const getFirstIdentityQuestion = () => {
|
|
|
77
77
|
max: 11,
|
|
78
78
|
});
|
|
79
79
|
const identifiers = { a: affine.a, b: affine.b };
|
|
80
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
81
|
+
};
|
|
82
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
80
83
|
const question = {
|
|
81
84
|
instruction: getInstruction(identifiers),
|
|
82
85
|
startStatement: getStartStatement(identifiers),
|
|
@@ -129,8 +132,6 @@ export const firstIdentity = {
|
|
|
129
132
|
id: "idRmq1",
|
|
130
133
|
connector: "=",
|
|
131
134
|
label: "Identité remarquable $(a+b)^2$",
|
|
132
|
-
levels: ["3ème", "2nde"],
|
|
133
|
-
sections: ["Calcul littéral"],
|
|
134
135
|
isSingleStep: false,
|
|
135
136
|
generator: (nb) => getDistinctQuestions(getFirstIdentityQuestion, nb),
|
|
136
137
|
qcmTimer: 60,
|
|
@@ -139,9 +140,5 @@ export const firstIdentity = {
|
|
|
139
140
|
isAnswerValid: isFirstIdentityAnswerValid,
|
|
140
141
|
subject: "Mathématiques",
|
|
141
142
|
hasHintAndCorrection: true,
|
|
142
|
-
|
|
143
|
-
getInstruction,
|
|
144
|
-
getCorrection,
|
|
145
|
-
getHint,
|
|
146
|
-
getStartStatement,
|
|
143
|
+
getQuestionFromIdentifiers,
|
|
147
144
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/idRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"idRmq2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/idRmq2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,6BAA6B,CAAC;AAiBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiFF,eAAO,MAAM,yBAAyB,EAAE,iBAAiB,CAAC,WAAW,CAapE,CAAC;AAkBF,eAAO,MAAM,6BAA6B,EAAE,YAAY,CAAC,WAAW,CAqCnE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,GAAG,CAAC,WAAW,CAgBxD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -83,6 +83,9 @@ export const getSecondIdentityQuestion = () => {
|
|
|
83
83
|
max: 0,
|
|
84
84
|
});
|
|
85
85
|
const identifiers = { a: affine.a, b: affine.b };
|
|
86
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
87
|
+
};
|
|
88
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
86
89
|
const question = {
|
|
87
90
|
instruction: getInstruction(identifiers),
|
|
88
91
|
startStatement: getStartStatement(identifiers),
|
|
@@ -142,9 +145,5 @@ export const secondIdentity = {
|
|
|
142
145
|
freeTimer: 60,
|
|
143
146
|
subject: "Mathématiques",
|
|
144
147
|
hasHintAndCorrection: true,
|
|
145
|
-
|
|
146
|
-
getCorrection,
|
|
147
|
-
getHint,
|
|
148
|
-
getAnswer,
|
|
149
|
-
getStartStatement,
|
|
148
|
+
getQuestionFromIdentifiers,
|
|
150
149
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/idRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"idRmq3.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/idRmq3.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQR,YAAY,EAEZ,iBAAiB,EACjB,GAAG,EAGJ,MAAM,6BAA6B,CAAC;AAiBrC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAoEF,eAAO,MAAM,wBAAwB,EAAE,iBAAiB,CAAC,WAAW,CAQnE,CAAC;AAiBF,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,WAAW,CA2BlE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,GAAG,CAAC,WAAW,CAgBvD,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAa/C,CAAC"}
|
|
@@ -78,6 +78,9 @@ export const getThirdIdentityQuestion = () => {
|
|
|
78
78
|
affine1Coeffs: affine.coefficients,
|
|
79
79
|
affine2Coeffs: affine2.coefficients,
|
|
80
80
|
};
|
|
81
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
82
|
+
};
|
|
83
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
81
84
|
const question = {
|
|
82
85
|
instruction: getInstruction(identifiers),
|
|
83
86
|
startStatement: getStartStatement(identifiers),
|
|
@@ -135,9 +138,5 @@ export const thirdIdentity = {
|
|
|
135
138
|
freeTimer: 60,
|
|
136
139
|
subject: "Mathématiques",
|
|
137
140
|
hasHintAndCorrection: true,
|
|
138
|
-
|
|
139
|
-
getCorrection,
|
|
140
|
-
getHint,
|
|
141
|
-
getAnswer,
|
|
142
|
-
getStartStatement,
|
|
141
|
+
getQuestionFromIdentifiers,
|
|
143
142
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identitiesWithNonIntegers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"identitiesWithNonIntegers.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/identitiesWithNonIntegers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,eAAe,EAEhB,MAAM,qCAAqC,CAAC;AAU7C,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,eAAe,CAAC;IACnB,CAAC,EAAE,eAAe,CAAC;CACpB,CAAC;AAiIF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAa3D,CAAC"}
|
|
@@ -107,6 +107,9 @@ const getIdentitiesWithNonIntegersQuestion = (ops) => {
|
|
|
107
107
|
a: a.toIdentifiers(),
|
|
108
108
|
b: b.toIdentifiers(),
|
|
109
109
|
};
|
|
110
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
111
|
+
};
|
|
112
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
110
113
|
const question = {
|
|
111
114
|
answer: getAnswer(identifiers),
|
|
112
115
|
instruction: getInstruction(identifiers),
|
|
@@ -129,8 +132,5 @@ export const identitiesWithNonIntegers = {
|
|
|
129
132
|
getPropositions,
|
|
130
133
|
isAnswerValid,
|
|
131
134
|
subject: "Mathématiques",
|
|
132
|
-
|
|
133
|
-
// getHint,
|
|
134
|
-
// getCorrection,
|
|
135
|
-
getAnswer,
|
|
135
|
+
getQuestionFromIdentifiers,
|
|
136
136
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleDistriXCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"simpleDistriXCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAmHF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
|
|
@@ -80,6 +80,9 @@ const getSimpleDistriXCoeffQuestion = () => {
|
|
|
80
80
|
const b = randint(-10, 11, [0]);
|
|
81
81
|
const c = randint(-10, 11, [0]);
|
|
82
82
|
const identifiers = { a, b, c };
|
|
83
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
84
|
+
};
|
|
85
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
83
86
|
const question = {
|
|
84
87
|
answer: getAnswer(identifiers),
|
|
85
88
|
instruction: getInstruction(identifiers),
|
|
@@ -103,9 +106,6 @@ export const simpleDistriXCoeff = {
|
|
|
103
106
|
getPropositions,
|
|
104
107
|
isAnswerValid,
|
|
105
108
|
subject: "Mathématiques",
|
|
106
|
-
|
|
107
|
-
getCorrection,
|
|
108
|
-
getInstruction,
|
|
109
|
-
getAnswer,
|
|
109
|
+
getQuestionFromIdentifiers,
|
|
110
110
|
hasHintAndCorrection: true,
|
|
111
111
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"equationSimpleSquare.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationSimpleSquare.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AA2BrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAqKF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAatD,CAAC"}
|
|
@@ -83,6 +83,9 @@ const getEquationSimpleSquare = () => {
|
|
|
83
83
|
else
|
|
84
84
|
randNbr = randint(2, 100);
|
|
85
85
|
const identifiers = { randNbr };
|
|
86
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
87
|
+
};
|
|
88
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
86
89
|
const question = {
|
|
87
90
|
instruction: getInstruction(identifiers),
|
|
88
91
|
answer: getAnswer(identifiers),
|
|
@@ -146,8 +149,6 @@ export const equationSimpleSquare = {
|
|
|
146
149
|
id: "equationSimpleSquare",
|
|
147
150
|
connector: "=",
|
|
148
151
|
label: "Résoudre une équation du second degré du type $x^2 = a$",
|
|
149
|
-
levels: ["2nde", "1reESM", "1reSpé", "1reTech"],
|
|
150
|
-
sections: ["Équations"],
|
|
151
152
|
isSingleStep: false,
|
|
152
153
|
generator: (nb) => getDistinctQuestions(getEquationSimpleSquare, nb),
|
|
153
154
|
qcmTimer: 60,
|
|
@@ -156,8 +157,5 @@ export const equationSimpleSquare = {
|
|
|
156
157
|
isAnswerValid,
|
|
157
158
|
subject: "Mathématiques",
|
|
158
159
|
hasHintAndCorrection: true,
|
|
159
|
-
|
|
160
|
-
getCorrection,
|
|
161
|
-
getInstruction,
|
|
162
|
-
getHint,
|
|
160
|
+
getQuestionFromIdentifiers,
|
|
163
161
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"equationWithDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationWithDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"equationWithDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/equationWithDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAiBrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuEF,KAAK,OAAO,GAAG;IACb,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAgEF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAcrE,CAAC"}
|
|
@@ -88,6 +88,9 @@ const getEquationWithDistributivityQuestion = (opts) => {
|
|
|
88
88
|
e,
|
|
89
89
|
f,
|
|
90
90
|
};
|
|
91
|
+
return getQuestionFromIdentifiers(identifiers, opts);
|
|
92
|
+
};
|
|
93
|
+
const getQuestionFromIdentifiers = (identifiers, opts) => {
|
|
91
94
|
const question = {
|
|
92
95
|
answer: getAnswer(identifiers),
|
|
93
96
|
instruction: getInstruction(identifiers),
|
|
@@ -118,8 +121,6 @@ export const equationWithDistributivity = {
|
|
|
118
121
|
getPropositions,
|
|
119
122
|
isAnswerValid,
|
|
120
123
|
subject: "Mathématiques",
|
|
121
|
-
|
|
122
|
-
// getCorrection,
|
|
123
|
-
getAnswer,
|
|
124
|
+
getQuestionFromIdentifiers,
|
|
124
125
|
options,
|
|
125
126
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"firstDegreeEquation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAerC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkGF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAarD,CAAC"}
|
|
@@ -52,6 +52,9 @@ const getFirstDegreeEquation = () => {
|
|
|
52
52
|
const a = randint(-30, 30, [0]);
|
|
53
53
|
const b = randint(-30, 30, [0]);
|
|
54
54
|
const identifiers = { a, b };
|
|
55
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
56
|
+
};
|
|
57
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
55
58
|
const question = {
|
|
56
59
|
instruction: getInstruction(identifiers),
|
|
57
60
|
startStatement: `x`,
|
|
@@ -84,8 +87,6 @@ export const firstDegreeEquation = {
|
|
|
84
87
|
id: "firstDegreeEquation",
|
|
85
88
|
connector: "=",
|
|
86
89
|
label: "Résoudre une équation du type $\\frac{a}{x} = b$",
|
|
87
|
-
levels: ["2nde", "1reESM", "1reSpé"],
|
|
88
|
-
sections: ["Équations", "Fonction inverse", "Fonctions de référence"],
|
|
89
90
|
isSingleStep: false,
|
|
90
91
|
generator: (nb) => getDistinctQuestions(getFirstDegreeEquation, nb),
|
|
91
92
|
getPropositions,
|
|
@@ -94,8 +95,5 @@ export const firstDegreeEquation = {
|
|
|
94
95
|
isAnswerValid,
|
|
95
96
|
subject: "Mathématiques",
|
|
96
97
|
hasHintAndCorrection: true,
|
|
97
|
-
|
|
98
|
-
getInstruction,
|
|
99
|
-
getCorrection,
|
|
100
|
-
getAnswer,
|
|
98
|
+
getQuestionFromIdentifiers,
|
|
101
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeEquationIntType1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"firstDegreeEquationIntType1.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAqHF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAe7D,CAAC"}
|
|
@@ -50,6 +50,9 @@ const getFirstDegreeEquationIntQuestion = () => {
|
|
|
50
50
|
const x = randint(-15, 15, [0]);
|
|
51
51
|
const b = a * x;
|
|
52
52
|
const identifiers = { a: a, x: x, b: b };
|
|
53
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
54
|
+
};
|
|
55
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
53
56
|
const question = {
|
|
54
57
|
answer: getAnswer(identifiers),
|
|
55
58
|
instruction: getInstruction(identifiers),
|
|
@@ -102,8 +105,5 @@ export const firstDegreeEquationIntType1 = {
|
|
|
102
105
|
isAnswerValid,
|
|
103
106
|
subject: "Mathématiques",
|
|
104
107
|
hasHintAndCorrection: true,
|
|
105
|
-
|
|
106
|
-
getInstruction,
|
|
107
|
-
getCorrection,
|
|
108
|
-
getAnswer,
|
|
108
|
+
getQuestionFromIdentifiers,
|
|
109
109
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firstDegreeEquationIntType2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"firstDegreeEquationIntType2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAWrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAkIF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAa7D,CAAC"}
|
|
@@ -49,6 +49,9 @@ const getFirstDegreeEquationIntQuestion = () => {
|
|
|
49
49
|
const c = randint(-15, 15, [0, a * x]);
|
|
50
50
|
const b = c - a * x;
|
|
51
51
|
const identifiers = { a, b, c, x };
|
|
52
|
+
return getQuestionFromIdentifiers(identifiers);
|
|
53
|
+
};
|
|
54
|
+
const getQuestionFromIdentifiers = (identifiers) => {
|
|
52
55
|
const question = {
|
|
53
56
|
answer: getAnswer(identifiers),
|
|
54
57
|
instruction: getInstruction(identifiers),
|
|
@@ -93,9 +96,7 @@ const isAnswerValid = (ans, { answer, x }) => {
|
|
|
93
96
|
export const firstDegreeEquationIntType2 = {
|
|
94
97
|
id: "firstDegreeEquationIntType2",
|
|
95
98
|
label: "Résoudre une équation du type $ax + b = c$ (solution entière)",
|
|
96
|
-
levels: ["2nde"],
|
|
97
99
|
isSingleStep: true,
|
|
98
|
-
sections: ["Équations"],
|
|
99
100
|
generator: (nb) => getDistinctQuestions(getFirstDegreeEquationIntQuestion, nb),
|
|
100
101
|
qcmTimer: 60,
|
|
101
102
|
freeTimer: 60,
|
|
@@ -103,8 +104,5 @@ export const firstDegreeEquationIntType2 = {
|
|
|
103
104
|
isAnswerValid,
|
|
104
105
|
subject: "Mathématiques",
|
|
105
106
|
hasHintAndCorrection: true,
|
|
106
|
-
|
|
107
|
-
getCorrection,
|
|
108
|
-
getHint,
|
|
109
|
-
getInstruction,
|
|
107
|
+
getQuestionFromIdentifiers,
|
|
110
108
|
};
|