math-exercises 3.0.217 → 3.0.218
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/arithmetics/commonDivisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/commonDivisorsList.js +1 -0
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerDivision.js +5 -8
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionAndIntegerProduct.js +7 -17
- package/lib/exercises/math/calcul/fractions/fractionForbiddenValue.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionForbiddenValue.js +5 -6
- package/lib/exercises/math/calcul/fractions/fractionsDivision.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsDivision.js +7 -17
- package/lib/exercises/math/calcul/fractions/fractionsSum.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSum.js +7 -22
- package/lib/exercises/math/calcul/fractions/fractionsSumFillInTheBlank.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumFillInTheBlank.js +7 -19
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsMultiplesDenominators.js +7 -22
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsPrimeDenominators.js +7 -22
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts +4 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +7 -23
- package/lib/exercises/math/calcul/fractions/periodicWritingToFraction.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/periodicWritingToFraction.js +3 -7
- package/lib/exercises/math/calcul/fractions/simplifyFraction.d.ts.map +1 -1
- package/lib/exercises/math/calcul/fractions/simplifyFraction.js +6 -7
- package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalDivisions.js +3 -4
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication101AndFriends.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication101AndFriends.js +2 -4
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication11AndFriends.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplication11AndFriends.js +2 -4
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationTable.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplicationTable.js +2 -4
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.d.ts.map +1 -1
- package/lib/exercises/math/calcul/mentalCaluls/mentalMultiplications.js +2 -4
- package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.d.ts.map +1 -1
- package/lib/exercises/math/calcul/operations/operationsPrioritiesWithoutRelative.js +3 -4
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityAdd.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityAdd.js +14 -3
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivitySubstract.js +14 -3
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +8 -5
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.js +14 -5
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +10 -10
- package/lib/exercises/math/calculLitteral/factorisation/factoByXK.d.ts +0 -8
- package/lib/exercises/math/calculLitteral/factorisation/factoByXK.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoByXK.js +223 -190
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +22 -9
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +0 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -1
- package/lib/exercises/math/complex/argumentFromAlgebraicComplex.d.ts.map +1 -1
- package/lib/exercises/math/complex/argumentFromAlgebraicComplex.js +10 -4
- package/lib/exercises/math/functions/absolute/absoluteValueEquations.js +12 -12
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustmentRsquared.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/adjustment/affineAdjustmentRsquared.js +10 -18
- package/lib/exercises/math/functions/affines/affineMeanValue.d.ts.map +1 -1
- package/lib/exercises/math/functions/affines/affineMeanValue.js +3 -5
- package/lib/exercises/math/functions/basics/findZeroesProductQuotient.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/findZeroesProductQuotient.js +0 -1
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.d.ts.map +1 -1
- package/lib/exercises/math/functions/basics/twoFunctionsEquation.js +12 -7
- package/lib/exercises/math/functions/integral/integralExpAxPlusB.d.ts.map +1 -1
- package/lib/exercises/math/functions/integral/integralExpAxPlusB.js +19 -3
- package/lib/exercises/math/functions/logarithm/log10Simplifying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/log10Simplifying.js +20 -6
- package/lib/exercises/math/functions/logarithm/logSimplifiying.d.ts.map +1 -1
- package/lib/exercises/math/functions/logarithm/logSimplifiying.js +14 -9
- package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.d.ts.map +1 -1
- package/lib/exercises/math/functions/rationalFraction/rationalFractionForbiddenValue.js +9 -6
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.js +12 -8
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/canonicalFromDevForm.js +21 -4
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAndCanonical/extremumFromCanonicalForm.js +4 -7
- package/lib/exercises/math/functions/trinoms/trinomialMeanValue.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/trinomialMeanValue.js +3 -5
- package/lib/exercises/math/geometry/areas/circleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/circleArea.js +4 -2
- package/lib/exercises/math/geometry/areas/rectangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/rectangleArea.js +4 -2
- package/lib/exercises/math/geometry/areas/rightTriangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/rightTriangleArea.js +14 -11
- package/lib/exercises/math/geometry/areas/squareArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/squareArea.js +4 -2
- package/lib/exercises/math/geometry/areas/squareSideFromArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/squareSideFromArea.js +6 -4
- package/lib/exercises/math/geometry/areas/triangleArea.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/triangleArea.js +3 -1
- package/lib/exercises/math/geometry/areas/triangleAreaV2.d.ts.map +1 -1
- package/lib/exercises/math/geometry/areas/triangleAreaV2.js +4 -2
- package/lib/exercises/math/geometry/cartesian/midpoint.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/midpoint.js +6 -11
- package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.js +3 -3
- package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.d.ts.map +1 -1
- package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.js +3 -3
- package/lib/exercises/math/geometry/vectors/vectorNormCalculation.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/vectorNormCalculation.js +3 -5
- package/lib/exercises/math/geometry/volumes/parallelepipedVolume.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/parallelepipedVolume.js +3 -4
- package/lib/exercises/math/geometry/volumes/sphereVolume.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/sphereVolume.js +3 -4
- package/lib/exercises/math/geometry/volumes/volumeOfCube.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfCube.js +3 -4
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.js +3 -6
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.d.ts.map +1 -1
- package/lib/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.js +3 -6
- package/lib/exercises/math/graphs/graphsChainOrPathOfLengthN.d.ts.map +1 -1
- package/lib/exercises/math/graphs/graphsChainOrPathOfLengthN.js +3 -1
- package/lib/exercises/math/graphs/graphsCheckIsConnectedGraph.d.ts.map +1 -1
- package/lib/exercises/math/graphs/graphsCheckIsConnectedGraph.js +19 -42
- package/lib/exercises/math/graphs/graphsCheckIsSameGraph.d.ts +0 -2
- package/lib/exercises/math/graphs/graphsCheckIsSameGraph.d.ts.map +1 -1
- package/lib/exercises/math/graphs/graphsCheckIsSameGraph.js +4 -14
- package/lib/exercises/math/graphs/graphsCheckIsVerticesAdjacent.d.ts.map +1 -1
- package/lib/exercises/math/graphs/graphsCheckIsVerticesAdjacent.js +3 -1
- package/lib/exercises/math/graphs/graphsDegreeOfVertex.d.ts.map +1 -1
- package/lib/exercises/math/graphs/graphsDegreeOfVertex.js +3 -1
- package/lib/exercises/math/graphs/graphsOrderOfGraph.d.ts.map +1 -1
- package/lib/exercises/math/graphs/graphsOrderOfGraph.js +3 -1
- package/lib/exercises/math/limits/rationalFracLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/rationalFracLimit.js +9 -20
- package/lib/exercises/math/limits/sequences/sequenceRationalFracLimit.d.ts.map +1 -1
- package/lib/exercises/math/limits/sequences/sequenceRationalFracLimit.js +9 -20
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormula.js +11 -28
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstRankOne.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstRankOne.js +12 -27
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.d.ts.map +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +3 -5
- package/lib/exercises/math/squareRoots/simpifySquareRoot.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/simpifySquareRoot.js +5 -4
- package/lib/exercises/math/squareRoots/squareRootEquation.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootEquation.js +9 -8
- package/lib/exercises/math/squareRoots/squareRootIdentities.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootIdentities.js +7 -4
- package/lib/exercises/math/squareRoots/squareRootsDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/squareRoots/squareRootsDistributivity.js +7 -8
- package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/arcLength.js +3 -8
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +0 -6
- package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +3 -4
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/dosage/concentrationFromMassCalculation.js +3 -18
- package/lib/exercises/pc/energy/energyTransfer.d.ts.map +1 -1
- package/lib/exercises/pc/energy/energyTransfer.js +3 -8
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.d.ts.map +1 -1
- package/lib/exercises/pc/energy/thermalEnergyTransferCalculation.js +3 -24
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.d.ts.map +1 -1
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +9 -6
- package/lib/exercises/vea/equationVEA.d.ts.map +1 -1
- package/lib/exercises/vea/equationVEA.js +2 -0
- package/lib/exercises/vea/rationalVEA.d.ts +2 -1
- package/lib/exercises/vea/rationalVEA.d.ts.map +1 -1
- package/lib/exercises/vea/rationalVEA.js +36 -2
- package/lib/index.d.ts +3 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/math/utils/graphs/graphRenderer.d.ts +7 -9
- package/lib/math/utils/graphs/graphRenderer.d.ts.map +1 -1
- package/lib/math/utils/graphs/graphRenderer.js +25 -117
- package/lib/tree/nodes/algebraicNode.d.ts +2 -0
- package/lib/tree/nodes/algebraicNode.d.ts.map +1 -1
- package/lib/tree/nodes/algebraicNode.js +11 -0
- package/lib/tree/nodes/functions/log10Node.d.ts +2 -2
- package/lib/tree/nodes/functions/log10Node.d.ts.map +1 -1
- package/lib/tree/nodes/functions/log10Node.js +3 -1
- package/lib/tree/nodes/functions/logNode.d.ts.map +1 -1
- package/lib/tree/nodes/functions/logNode.js +2 -0
- package/lib/tree/nodes/operators/addNode.js +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +1 -1
- package/package.json +1 -7
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
3
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
5
|
import { shuffle } from "../../../../utils/alea/shuffle.js";
|
|
5
6
|
const getInstruction = (identifiers) => {
|
|
@@ -58,8 +59,9 @@ const getPropositions = (n, { answer, side }) => {
|
|
|
58
59
|
return shuffle(propositions);
|
|
59
60
|
};
|
|
60
61
|
const isAnswerValid = (ans, { answer }) => {
|
|
61
|
-
const
|
|
62
|
-
|
|
62
|
+
const trimed = ans.replace("\\text{cm}^2", "").replace("\\text{cm}^{2}", "");
|
|
63
|
+
const nb = answer.split("\\text")[0];
|
|
64
|
+
return numberVEA(trimed, nb);
|
|
63
65
|
};
|
|
64
66
|
export const squareArea = {
|
|
65
67
|
id: "squareArea",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squareSideFromArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/squareSideFromArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"squareSideFromArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/squareSideFromArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AASrC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAsEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAiBpD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { sqrtVEA } from "../../../../exercises/vea/sqrtVEA.js";
|
|
3
4
|
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
5
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
6
|
import { round } from "../../../../math/utils/round.js";
|
|
@@ -36,10 +37,11 @@ $$
|
|
|
36
37
|
const getKeys = () => {
|
|
37
38
|
return [];
|
|
38
39
|
};
|
|
39
|
-
const isAnswerValid = (ans, {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
41
|
+
return sqrtVEA(ans, answer, {
|
|
42
|
+
decimalApproxAllowed: 2,
|
|
43
|
+
allowNonIrreductible: true,
|
|
44
|
+
});
|
|
43
45
|
};
|
|
44
46
|
const getSquareSideFromAreaQuestion = () => {
|
|
45
47
|
const isPerfectSquare = coinFlip();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triangleArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAOnD,OAAO,EAGL,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AAOxC,KAAK,WAAW,GAAG;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;
|
|
1
|
+
{"version":3,"file":"triangleArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAGL,mBAAmB,EACpB,MAAM,2CAA2C,CAAC;AAOnD,OAAO,EAGL,kBAAkB,EACnB,MAAM,gCAAgC,CAAC;AAOxC,KAAK,WAAW,GAAG;IACjB,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,iBAAiB,EAAE,kBAAkB,CAAC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAsJF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAkB9C,CAAC"}
|
|
@@ -118,7 +118,9 @@ const getPropositions = (n, { answer }) => {
|
|
|
118
118
|
return shuffle(propositions);
|
|
119
119
|
};
|
|
120
120
|
const isAnswerValid = (ans, { base, height }) => {
|
|
121
|
-
const formated = ans
|
|
121
|
+
const formated = ans
|
|
122
|
+
.replaceAll("\\text{cm}^2", "")
|
|
123
|
+
.replaceAll("\\text{cm}^{2}", "");
|
|
122
124
|
try {
|
|
123
125
|
const parsed = valueParser(formated);
|
|
124
126
|
if (parsed === false)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triangleAreaV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleAreaV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"triangleAreaV2.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/triangleAreaV2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAmHF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAehD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
3
4
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
5
|
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
5
6
|
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
@@ -94,8 +95,9 @@ const getPropositions = (n, { answer, randomSide }) => {
|
|
|
94
95
|
return shuffle(propositions);
|
|
95
96
|
};
|
|
96
97
|
const isAnswerValid = (ans, { answer }) => {
|
|
97
|
-
const
|
|
98
|
-
|
|
98
|
+
const trimed = ans.replace("\\text{cm}^2", "").replace("\\text{cm}^{2}", "");
|
|
99
|
+
const nb = answer.split("\\text")[0];
|
|
100
|
+
return numberVEA(trimed, nb);
|
|
99
101
|
};
|
|
100
102
|
export const triangleAreaV2 = {
|
|
101
103
|
id: "triangleAreaV2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"midpoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/midpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;
|
|
1
|
+
{"version":3,"file":"midpoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/midpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAyJF,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAAC,WAAW,CAa1C,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { pointVEA } from "../../../../exercises/vea/pointVEA.js";
|
|
3
4
|
import { Point } from "../../../../math/geometry/point.js";
|
|
4
5
|
import { distinctRandTupleInt } from "../../../../math/utils/random/randTupleInt.js";
|
|
5
|
-
import { PointNode } from "../../../../tree/nodes/geometry/pointNode.js";
|
|
6
6
|
import { NumberNode } from "../../../../tree/nodes/numbers/numberNode.js";
|
|
7
7
|
import { add } from "../../../../tree/nodes/operators/addNode.js";
|
|
8
8
|
import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
@@ -34,7 +34,7 @@ $$
|
|
|
34
34
|
};
|
|
35
35
|
const getAnswer = (identifiers) => {
|
|
36
36
|
const [A, B] = getPoints(identifiers);
|
|
37
|
-
const answer = A.midpoint(B).
|
|
37
|
+
const answer = A.midpoint(B).toCoords();
|
|
38
38
|
return answer;
|
|
39
39
|
};
|
|
40
40
|
const getCorrection = (identifiers) => {
|
|
@@ -66,7 +66,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
66
66
|
instruction: getInstruction(identifiers),
|
|
67
67
|
startStatement: "I",
|
|
68
68
|
answer: getAnswer(identifiers),
|
|
69
|
-
keys: ["
|
|
69
|
+
keys: ["semicolon"],
|
|
70
70
|
answerFormat: "tex",
|
|
71
71
|
identifiers,
|
|
72
72
|
hint: getHint(identifiers),
|
|
@@ -95,14 +95,9 @@ const getPropositions = (n, { answer, coordsA, coordsB }) => {
|
|
|
95
95
|
});
|
|
96
96
|
return shuffle(propositions);
|
|
97
97
|
};
|
|
98
|
-
const isAnswerValid = (ans, {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const answer = new PointNode(A.midpoint(B), {
|
|
102
|
-
allowFractionToDecimal: true,
|
|
103
|
-
});
|
|
104
|
-
const texs = answer.toAllValidTexs();
|
|
105
|
-
return texs.includes(ans);
|
|
98
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
99
|
+
return (pointVEA(ans, answer) ||
|
|
100
|
+
pointVEA(ans.replace("I", ""), answer.replace("I", "")));
|
|
106
101
|
};
|
|
107
102
|
export const midpoint = {
|
|
108
103
|
id: "midpoint",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rectangleSideFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"rectangleSideFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAiHF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAmB5D,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { rationalVEA } from "../../../../exercises/vea/rationalVEA.js";
|
|
3
4
|
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
4
5
|
import { round } from "../../../../math/utils/round.js";
|
|
5
6
|
import { FractionNode } from "../../../../tree/nodes/operators/fractionNode.js";
|
|
@@ -70,9 +71,8 @@ ${alignTex([
|
|
|
70
71
|
const getKeys = () => {
|
|
71
72
|
return [];
|
|
72
73
|
};
|
|
73
|
-
const isAnswerValid = (ans, {
|
|
74
|
-
|
|
75
|
-
return node.toAllValidTexs({ allowFractionToDecimal: true }).includes(ans);
|
|
74
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
75
|
+
return rationalVEA(ans, answer);
|
|
76
76
|
};
|
|
77
77
|
const getRectangleSideFromPerimeterQuestion = () => {
|
|
78
78
|
const width = randfloat(1, 50, 1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"squareSideFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/squareSideFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"squareSideFromPerimeter.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/perimeters/squareSideFromPerimeter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAuEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAkBzD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addValidProp, shuffleProps, tryToAddWrongProp, propWhile, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { rationalVEA } from "../../../../exercises/vea/rationalVEA.js";
|
|
3
4
|
import { SquareRoot } from "../../../../math/numbers/reals/real.js";
|
|
4
5
|
import { randfloat } from "../../../../math/utils/random/randfloat.js";
|
|
5
6
|
import { round } from "../../../../math/utils/round.js";
|
|
@@ -36,9 +37,8 @@ $$
|
|
|
36
37
|
const getKeys = () => {
|
|
37
38
|
return [];
|
|
38
39
|
};
|
|
39
|
-
const isAnswerValid = (ans, {
|
|
40
|
-
|
|
41
|
-
return node.toAllValidTexs({ allowFractionToDecimal: true }).includes(ans);
|
|
40
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
41
|
+
return rationalVEA(ans, answer);
|
|
42
42
|
};
|
|
43
43
|
const getSquareSideFromPerimeterQuestion = () => {
|
|
44
44
|
const identifiers = { perimeter: randfloat(1, 100, 1) };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/vectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"vectorNormCalculation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/vectorNormCalculation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAYrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA6FF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAevD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { sqrtVEA } from "../../../../exercises/vea/sqrtVEA.js";
|
|
3
4
|
import { Vector, VectorConstructor } from "../../../../math/geometry/vector.js";
|
|
4
5
|
import { SquareRootConstructor } from "../../../../math/numbers/reals/real.js";
|
|
5
6
|
import { SqrtNode } from "../../../../tree/nodes/functions/sqrtNode.js";
|
|
@@ -84,11 +85,8 @@ const generateProposition = (x, y) => {
|
|
|
84
85
|
const firstProposition = new AddNode(xNode, yNode);
|
|
85
86
|
return [firstProposition];
|
|
86
87
|
};
|
|
87
|
-
const isAnswerValid = (ans, {
|
|
88
|
-
|
|
89
|
-
return correctAnswer
|
|
90
|
-
.toAllValidTexs({ allowSimplifySqrt: true })
|
|
91
|
-
.includes(ans);
|
|
88
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
89
|
+
return sqrtVEA(ans, answer);
|
|
92
90
|
};
|
|
93
91
|
export const vectorNormCalculation = {
|
|
94
92
|
id: "vectorNormCalculation",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parallelepipedVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/parallelepipedVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"parallelepipedVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/parallelepipedVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAsLF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAetD,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { randint } from "../../../../math/utils/random/randint.js";
|
|
|
4
4
|
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
5
5
|
import { round } from "../../../../math/utils/round.js";
|
|
6
6
|
import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
|
|
7
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
7
8
|
const getParallelepipedVolumeQuestion = () => {
|
|
8
9
|
const length = randint(50, 110) / 10;
|
|
9
10
|
const width = randint(50, 110) / 10;
|
|
@@ -160,10 +161,8 @@ const getPropositions = (n, { answer, length, width, height }) => {
|
|
|
160
161
|
});
|
|
161
162
|
return shuffleProps(propositions, n);
|
|
162
163
|
};
|
|
163
|
-
const isAnswerValid = (ans, {
|
|
164
|
-
|
|
165
|
-
const latexs = validanswer.toAllValidTexs();
|
|
166
|
-
return latexs.includes(ans);
|
|
164
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
165
|
+
return numberVEA(ans, answer);
|
|
167
166
|
};
|
|
168
167
|
export const parallelepipedVolume = {
|
|
169
168
|
id: "parallelepipedVolume",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sphereVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/sphereVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"sphereVolume.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/sphereVolume.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA8HF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAiB9C,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQue
|
|
|
3
3
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
4
4
|
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
5
5
|
import { round } from "../../../../math/utils/round.js";
|
|
6
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
6
7
|
const getInstruction = (identifiers) => {
|
|
7
8
|
const { radius } = identifiers;
|
|
8
9
|
return `La boule ci-dessous a un rayon de $${radius.frenchify()}$.
|
|
@@ -103,10 +104,8 @@ const getPropositions = (n, { answer, radius }) => {
|
|
|
103
104
|
});
|
|
104
105
|
return shuffleProps(propositions, n);
|
|
105
106
|
};
|
|
106
|
-
const isAnswerValid = (ans, {
|
|
107
|
-
|
|
108
|
-
const latexs = validanswer.toAllValidTexs();
|
|
109
|
-
return latexs.includes(ans);
|
|
107
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
108
|
+
return numberVEA(ans, answer);
|
|
110
109
|
};
|
|
111
110
|
export const sphereVolume = {
|
|
112
111
|
id: "sphereVolume",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeOfCube.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfCube.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"volumeOfCube.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfCube.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAqGF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAe9C,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
3
4
|
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
4
5
|
import { randint } from "../../../../math/utils/random/randint.js";
|
|
5
|
-
import { PowerNode } from "../../../../tree/nodes/operators/powerNode.js";
|
|
6
6
|
const getInstruction = (identifiers) => {
|
|
7
7
|
const { cubeSide } = identifiers;
|
|
8
8
|
return `$ABCDEFGH$ est un cube d'arête $${cubeSide}$.
|
|
@@ -74,9 +74,8 @@ const getPropositions = (n, { answer, cubeSide }) => {
|
|
|
74
74
|
});
|
|
75
75
|
return shuffleProps(propositions, n);
|
|
76
76
|
};
|
|
77
|
-
const isAnswerValid = (ans, { answer
|
|
78
|
-
|
|
79
|
-
return [answer, ...powerNode.toAllValidTexs()].includes(ans);
|
|
77
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
78
|
+
return numberVEA(ans, answer);
|
|
80
79
|
};
|
|
81
80
|
const generatePropositions = (cubeSide) => {
|
|
82
81
|
const firstProposition = Math.pow(cubeSide, 2) * 6;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeOfPyramidWithTriangleBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"volumeOfPyramidWithTriangleBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAwNF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAejE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
|
|
3
4
|
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
4
5
|
import { RationalConstructor } from "../../../../math/numbers/rationals/rational.js";
|
|
5
6
|
import { unfrenchify } from "../../../../math/utils/latex/unfrenchify.js";
|
|
@@ -162,12 +163,8 @@ const getPropositions = (n, { answer, baseOfPyramidSides, h }) => {
|
|
|
162
163
|
});
|
|
163
164
|
return shuffleProps(propositions, n);
|
|
164
165
|
};
|
|
165
|
-
const isAnswerValid = (ans, {
|
|
166
|
-
|
|
167
|
-
return volume
|
|
168
|
-
.simplify()
|
|
169
|
-
.toAllValidTexs({ allowFractionToDecimal: true })
|
|
170
|
-
.includes(ans);
|
|
166
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
167
|
+
return numberVEA(ans, answer);
|
|
171
168
|
};
|
|
172
169
|
const generatePropositions = (baseOfPyramidSides, h) => {
|
|
173
170
|
const firstProposition = new FractionNode((baseOfPyramidSides.ABSide * baseOfPyramidSides.ACSide).toTree(), (3).toTree())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"volumeOfPyramidWithTriangleRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"volumeOfPyramidWithTriangleRectBase.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/volumes/volumeOfPyramidWithTriangleRectBase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,kBAAkB,EAAE,aAAa,CAAC;CACnC,CAAC;AAEF,KAAK,aAAa,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AA4NxE,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAgBjD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { addValidProp, propWhile, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
|
|
2
2
|
import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { rationalVEA } from "../../../../exercises/vea/rationalVEA.js";
|
|
3
4
|
import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
|
|
4
5
|
import { RationalConstructor } from "../../../../math/numbers/rationals/rational.js";
|
|
5
6
|
import { unfrenchify } from "../../../../math/utils/latex/unfrenchify.js";
|
|
@@ -163,12 +164,8 @@ const getPropositions = (n, { answer, baseOfPyramidSides, h }) => {
|
|
|
163
164
|
});
|
|
164
165
|
return shuffleProps(propositions, n);
|
|
165
166
|
};
|
|
166
|
-
const isAnswerValid = (ans, {
|
|
167
|
-
|
|
168
|
-
return volume
|
|
169
|
-
.simplify()
|
|
170
|
-
.toAllValidTexs({ allowFractionToDecimal: true })
|
|
171
|
-
.includes(ans);
|
|
167
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
168
|
+
return rationalVEA(ans, answer);
|
|
172
169
|
};
|
|
173
170
|
const generatePropositions = (baseOfPyramidSides) => {
|
|
174
171
|
const firstProposition = new FractionNode((baseOfPyramidSides.ABSide +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphsChainOrPathOfLengthN.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsChainOrPathOfLengthN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AAWlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;
|
|
1
|
+
{"version":3,"file":"graphsChainOrPathOfLengthN.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsChainOrPathOfLengthN.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAKrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AAWlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAgTF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsBF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAerE,CAAC"}
|
|
@@ -27,7 +27,9 @@ const getHydrated = (identifiers) => {
|
|
|
27
27
|
const getInstruction = (identifiers) => {
|
|
28
28
|
const { graphIds, lengthAsked } = identifiers;
|
|
29
29
|
return `Un graphe ${graphIds.isDirected ? "orienté" : "non orienté"} est représenté ci-dessous.
|
|
30
|
-
Déterminer ${graphIds.isDirected ? "un chemin" : "une chaîne"} de longueur $${lengthAsked}$
|
|
30
|
+
Déterminer ${graphIds.isDirected ? "un chemin" : "une chaîne"} de longueur $${lengthAsked}$ ?
|
|
31
|
+
|
|
32
|
+
*On peut déplacer les points sur la figure.*`;
|
|
31
33
|
};
|
|
32
34
|
const getAnswer = (identifiers) => {
|
|
33
35
|
const { arrTexPath } = getHydrated(identifiers);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphsCheckIsConnectedGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsCheckIsConnectedGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,
|
|
1
|
+
{"version":3,"file":"graphsCheckIsConnectedGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsCheckIsConnectedGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAIrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AAOlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAG3B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AA0MF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAiB7D,CAAC"}
|
|
@@ -2,14 +2,13 @@ import { addValidProp, tryToAddWrongProp, } from "../../../exercises/exercise.js
|
|
|
2
2
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
3
|
import { GeogebraConstructor } from "../../../geogebra/geogebraConstructor.js";
|
|
4
4
|
import { Point } from "../../../math/geometry/point.js";
|
|
5
|
-
import { GraphConstructor
|
|
5
|
+
import { GraphConstructor } from "../../../math/graphs/graph.js";
|
|
6
6
|
import { GraphRenderer, } from "../../../math/utils/graphs/graphRenderer.js";
|
|
7
7
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
8
8
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
9
9
|
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
10
10
|
import { splitIntoRandomChunks } from "../../../utils/arrays/arrayChunks.js";
|
|
11
11
|
import { joinanded } from "../../../utils/strings/joinanded.js";
|
|
12
|
-
import * as Flatten from "@flatten-js/core";
|
|
13
12
|
const getHydrated = (identifiers) => {
|
|
14
13
|
const { graphIds } = identifiers;
|
|
15
14
|
const graph = GraphConstructor.fromIdentifiers(graphIds);
|
|
@@ -20,6 +19,7 @@ const getHydrated = (identifiers) => {
|
|
|
20
19
|
const getInstruction = () => {
|
|
21
20
|
return `Un graphe non orienté est représenté ci-dessous.
|
|
22
21
|
Le graphe est-il connexe ?
|
|
22
|
+
|
|
23
23
|
*On peut déplacer les points sur la figure.*`;
|
|
24
24
|
};
|
|
25
25
|
const getAnswer = (identifiers) => {
|
|
@@ -91,48 +91,25 @@ const createRandomIdentifiers = () => {
|
|
|
91
91
|
const isConnected = coinFlip();
|
|
92
92
|
const vertexNames = "ABCDEFGHIJKLM".split("").slice(0, nbVertices);
|
|
93
93
|
const { graph, graphNodes, graphEdges } = (() => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const { nodes: graphNodes0, edges: graphEdges0 } = GraphRenderer.renderToNodesAndEdges(graphForPoints, "circo");
|
|
101
|
-
graphNodes = graphNodes0;
|
|
102
|
-
let arrGraphNodes; //to check overlapping
|
|
103
|
-
[graph, arrGraphEdges, arrGraphNodes] = (() => {
|
|
104
|
-
if (isConnected) {
|
|
105
|
-
return [graphForPoints, [graphEdges0], [graphNodes0]];
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
const arrVertexNamesChunk = splitIntoRandomChunks(shuffle(vertexNames), 3);
|
|
109
|
-
const arrSubGraph = arrVertexNamesChunk.map((vertexNamesChunk) => GraphConstructor.randomConnected(vertexNamesChunk.length, isSimple, false, minDensity, vertexNamesChunk));
|
|
110
|
-
const graph = GraphConstructor.graphByMergingSimpleGraphs(arrSubGraph);
|
|
111
|
-
const arrGraphEdges = arrSubGraph.map((graph) => graph.arrConnection().map(([from, to, _]) => {
|
|
112
|
-
return { from, to };
|
|
113
|
-
}));
|
|
114
|
-
const dictGraphNodes = Object.fromEntries(graphNodes.map((graphNode) => [graphNode.label, graphNode]));
|
|
115
|
-
const arrGraphNodes = arrSubGraph.map((graph) => graph.vertexNames.map((nameVertex) => dictGraphNodes[nameVertex]));
|
|
116
|
-
return [graph, arrGraphEdges, arrGraphNodes];
|
|
117
|
-
}
|
|
118
|
-
})();
|
|
119
|
-
const arrGraphNodes1GraphNodes2 = [...Array(arrGraphNodes.length).keys()]
|
|
120
|
-
.flatMap((i) => [...Array(i + 1).keys()].map((j) => [i, j]))
|
|
121
|
-
.map(([i, j]) => [arrGraphNodes[i], arrGraphNodes[j]]);
|
|
122
|
-
try {
|
|
123
|
-
isFound = arrGraphNodes1GraphNodes2.every(([graphNodes1, graphNodes2]) => {
|
|
124
|
-
const [polygon1, polygon2] = [graphNodes1, graphNodes2].map((graphNodes) => {
|
|
125
|
-
const arrPoint = graphNodes.map(({ x, y }) => new Flatten.Point(x, y));
|
|
126
|
-
const polygon = new Flatten.Polygon(arrPoint);
|
|
127
|
-
return polygon;
|
|
128
|
-
});
|
|
129
|
-
return Flatten.Relations.intersect(polygon1, polygon2);
|
|
130
|
-
});
|
|
94
|
+
const graphForPoints = GraphConstructor.randomConnected(nbVertices, isSimple, false, minDensity, vertexNames);
|
|
95
|
+
const { nodes: graphNodes0, edges: graphEdges0 } = GraphRenderer.renderToNodesAndEdges(graphForPoints);
|
|
96
|
+
const graphNodes = graphNodes0;
|
|
97
|
+
const [graph, arrGraphEdges] = (() => {
|
|
98
|
+
if (isConnected) {
|
|
99
|
+
return [graphForPoints, [graphEdges0], [graphNodes0]];
|
|
131
100
|
}
|
|
132
|
-
|
|
133
|
-
|
|
101
|
+
else {
|
|
102
|
+
const arrVertexNamesChunk = splitIntoRandomChunks(shuffle(vertexNames), 3);
|
|
103
|
+
const arrSubGraph = arrVertexNamesChunk.map((vertexNamesChunk) => GraphConstructor.randomConnected(vertexNamesChunk.length, isSimple, false, minDensity, vertexNamesChunk));
|
|
104
|
+
const graph = GraphConstructor.graphByMergingSimpleGraphs(arrSubGraph);
|
|
105
|
+
const arrGraphEdges = arrSubGraph.map((graph) => graph.arrConnection().map(([from, to, _]) => {
|
|
106
|
+
return { from, to };
|
|
107
|
+
}));
|
|
108
|
+
const dictGraphNodes = Object.fromEntries(graphNodes.map((graphNode) => [graphNode.label, graphNode]));
|
|
109
|
+
const arrGraphNodes = arrSubGraph.map((graph) => graph.vertexNames.map((nameVertex) => dictGraphNodes[nameVertex]));
|
|
110
|
+
return [graph, arrGraphEdges, arrGraphNodes];
|
|
134
111
|
}
|
|
135
|
-
}
|
|
112
|
+
})();
|
|
136
113
|
const graphEdges = arrGraphEdges.reduce((acc, graphEdges) => {
|
|
137
114
|
acc = [...acc, ...graphEdges];
|
|
138
115
|
return acc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphsCheckIsSameGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsCheckIsSameGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"graphsCheckIsSameGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsCheckIsSameGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AAMlD,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,gBAAgB,CAAC;IAC5B,SAAS,EAAE,gBAAgB,CAAC;IAG5B,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,WAAW,EAAE,SAAS,EAAE,CAAC;IAEzB,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,WAAW,EAAE,SAAS,EAAE,CAAC;CAC1B,CAAC;AAwWF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsBF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAejE,CAAC"}
|
|
@@ -10,7 +10,6 @@ import { randint } from "../../../math/utils/random/randint.js";
|
|
|
10
10
|
import { coinFlip } from "../../../utils/alea/coinFlip.js";
|
|
11
11
|
import { probaLawFlip } from "../../../utils/alea/probaLawFlip.js";
|
|
12
12
|
import { random, randomMany } from "../../../utils/alea/random.js";
|
|
13
|
-
import { shuffle } from "../../../utils/alea/shuffle.js";
|
|
14
13
|
const getHydrated = (identifiers) => {
|
|
15
14
|
const { graphIds1, graphIds2, graphNodes1, graphEdges1, graphNodes2, graphEdges2, } = identifiers;
|
|
16
15
|
const [graph1, graph2] = [graphIds1, graphIds2].map((graphIds) => GraphConstructor.fromIdentifiers(graphIds));
|
|
@@ -90,7 +89,7 @@ Ce sont donc des graphes différents.`;
|
|
|
90
89
|
// });
|
|
91
90
|
// };
|
|
92
91
|
const getGGBOptions = (identifiers) => {
|
|
93
|
-
const { graphNodes1, graphEdges1,
|
|
92
|
+
const { graphNodes1, graphEdges1, graphNodes2, graphEdges2 } = identifiers;
|
|
94
93
|
const { graph1, graph2 } = getHydrated(identifiers);
|
|
95
94
|
function createDisplayObjForGraph(graph, graphNodes, graphEdges, scale, index, vecOffset = new Vector("offset", (0).toTree(), (0).toTree())) {
|
|
96
95
|
const arrDictPoint = graphNodes
|
|
@@ -121,12 +120,12 @@ const getGGBOptions = (identifiers) => {
|
|
|
121
120
|
arrGGBCommandForGraph,
|
|
122
121
|
};
|
|
123
122
|
}
|
|
124
|
-
const { arrPoint: arrPoint1, arrGGBCommandForGraph: arrGGBCommandForGraph1 } = createDisplayObjForGraph(graph1, graphNodes1, graphEdges1,
|
|
123
|
+
const { arrPoint: arrPoint1, arrGGBCommandForGraph: arrGGBCommandForGraph1 } = createDisplayObjForGraph(graph1, graphNodes1, graphEdges1, 1, 1);
|
|
125
124
|
const xMin1 = Math.min(...arrPoint1.map((point) => point.x.evaluate()));
|
|
126
125
|
const xMax1 = Math.max(...arrPoint1.map((point) => point.x.evaluate()));
|
|
127
126
|
const width1 = xMax1 - xMin1;
|
|
128
127
|
const vecOffset = new Vector("offset", (xMax1 + 0.1 * width1).toTree(), (0).toTree());
|
|
129
|
-
const { arrPoint: arrPoint2, arrGGBCommandForGraph: arrGGBCommandForGraph2 } = createDisplayObjForGraph(graph2, graphNodes2, graphEdges2,
|
|
128
|
+
const { arrPoint: arrPoint2, arrGGBCommandForGraph: arrGGBCommandForGraph2 } = createDisplayObjForGraph(graph2, graphNodes2, graphEdges2, 1, 2, vecOffset);
|
|
130
129
|
const ggb = new GeogebraConstructor({
|
|
131
130
|
commands: [...arrGGBCommandForGraph1, ...arrGGBCommandForGraph2],
|
|
132
131
|
fontSize: 16,
|
|
@@ -230,23 +229,14 @@ const createRandomIdentifiers = (isDirected) => {
|
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
231
|
})();
|
|
233
|
-
const [
|
|
234
|
-
["fdp", 1.5],
|
|
235
|
-
["circo", 1.0],
|
|
236
|
-
]);
|
|
237
|
-
const [{ nodes: graphNodes1, edges: graphEdges1 }, { nodes: graphNodes2, edges: graphEdges2 },] = [
|
|
238
|
-
{ graph: graph1, layoutEngine: layoutEngine1 },
|
|
239
|
-
{ graph: graph2, layoutEngine: layoutEngine2 },
|
|
240
|
-
].map(({ graph, layoutEngine }) => GraphRenderer.renderToNodesAndEdges(graph, layoutEngine));
|
|
232
|
+
const [{ nodes: graphNodes1, edges: graphEdges1 }, { nodes: graphNodes2, edges: graphEdges2 },] = [{ graph: graph1 }, { graph: graph2 }].map(({ graph }) => GraphRenderer.renderToNodesAndEdges(graph));
|
|
241
233
|
const identifiers = {
|
|
242
234
|
graphIds1: graph1.toIdentifiers(),
|
|
243
235
|
graphIds2: graph2.toIdentifiers(),
|
|
244
236
|
graphNodes1,
|
|
245
237
|
graphEdges1,
|
|
246
|
-
scale1,
|
|
247
238
|
graphNodes2,
|
|
248
239
|
graphEdges2,
|
|
249
|
-
scale2,
|
|
250
240
|
};
|
|
251
241
|
return identifiers;
|
|
252
242
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphsCheckIsVerticesAdjacent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsCheckIsVerticesAdjacent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AAMlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;
|
|
1
|
+
{"version":3,"file":"graphsCheckIsVerticesAdjacent.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsCheckIsVerticesAdjacent.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAgBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AAMlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAoOF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsBF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAkBxE,CAAC"}
|
|
@@ -24,7 +24,9 @@ const getHydrated = (identifiers) => {
|
|
|
24
24
|
const getInstruction = (identifiers) => {
|
|
25
25
|
const { nameVertex1, nameVertex2 } = identifiers;
|
|
26
26
|
return `Un graphe est représenté ci-dessous.
|
|
27
|
-
Les sommets $${nameVertex1}$ et $${nameVertex2}$ sont-ils adjacents
|
|
27
|
+
Les sommets $${nameVertex1}$ et $${nameVertex2}$ sont-ils adjacents ?
|
|
28
|
+
|
|
29
|
+
*On peut déplacer les points sur la figure.*`;
|
|
28
30
|
};
|
|
29
31
|
const getAnswer = (identifiers) => {
|
|
30
32
|
const { isAdjacent } = getHydrated(identifiers);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphsDegreeOfVertex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsDegreeOfVertex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AASlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IAGnB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;
|
|
1
|
+
{"version":3,"file":"graphsDegreeOfVertex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsDegreeOfVertex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AASlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IAGnB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAqQF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsBF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAe/D,CAAC"}
|
|
@@ -27,7 +27,9 @@ const getHydrated = (identifiers) => {
|
|
|
27
27
|
const getInstruction = (identifiers) => {
|
|
28
28
|
const { nameVertexAsked } = getHydrated(identifiers);
|
|
29
29
|
return `Un graphe est représenté ci-dessous.
|
|
30
|
-
Quel est le degré du sommet $${nameVertexAsked}$
|
|
30
|
+
Quel est le degré du sommet $${nameVertexAsked}$ ?
|
|
31
|
+
|
|
32
|
+
*On peut déplacer les points sur la figure.*`;
|
|
31
33
|
};
|
|
32
34
|
const getAnswerNode = (identifiers) => {
|
|
33
35
|
const { arrNameVertexAdjacent } = getHydrated(identifiers);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphsOrderOfGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsOrderOfGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AAUlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAG3B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;
|
|
1
|
+
{"version":3,"file":"graphsOrderOfGraph.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/graphs/graphsOrderOfGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAoBT,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAoB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,SAAS,EACT,SAAS,EAEV,MAAM,0CAA0C,CAAC;AAUlD,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,gBAAgB,CAAC;IAG3B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAsPF,KAAK,OAAO,GAAG;IACb,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAsBF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAe7D,CAAC"}
|