math-exercises 2.2.21 → 2.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/exercise.d.ts +22 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.d.ts +8 -0
- package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.d.ts.map +1 -0
- package/lib/exercises/math/calcul/arithmetics/divisibiltyCriteria.js +107 -0
- package/lib/exercises/math/calcul/arithmetics/index.d.ts +1 -0
- package/lib/exercises/math/calcul/arithmetics/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/index.js +1 -0
- package/lib/exercises/math/calcul/fractions/fractionsSumsSameDenominators.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/canonicalFormDevelopment.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/firstIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/index.js +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/secondIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.d.ts +9 -0
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.js +113 -0
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/distributivity/simpleDistributivity.js +44 -19
- package/lib/exercises/math/calculLitteral/distributivity/thirdIdentity.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType1Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType2Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType3Exercise.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType1.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/firstDegreeEquationIntType2.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/fractionEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/equation/multiplicationEquation.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq1.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq2.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoIdRmq3.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType1Exercise.js +0 -1
- package/lib/exercises/math/calculLitteral/factorisation/factoType2.d.ts +11 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoType2.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/factoType2.js +110 -0
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalForm.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/factorisation/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/factorisation/index.js +1 -0
- package/lib/exercises/math/derivation/index.d.ts +0 -1
- package/lib/exercises/math/derivation/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/index.js +0 -1
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.d.ts +8 -0
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +102 -0
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.d.ts +42 -0
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.d.ts.map +1 -0
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +231 -0
- package/lib/exercises/math/derivation/tangent/index.d.ts +2 -0
- package/lib/exercises/math/derivation/tangent/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/index.js +2 -0
- package/lib/exercises/math/functions/logarithm/log10PowerSimplifying.js +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinates.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinates.js +1 -0
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoAxisNumbers.js +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/pointCoordinatesNoOrthonorm.js +1 -0
- package/lib/exercises/math/geometry/shapes/basicShapesNaming.d.ts.map +1 -1
- package/lib/exercises/math/geometry/shapes/basicShapesNaming.js +9 -17
- package/lib/exercises/math/geometry/vectors/index.d.ts +1 -2
- package/lib/exercises/math/geometry/vectors/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/index.js +1 -2
- package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts +3 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/index.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/index.js +19 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductOrthoInSquare.js +136 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCoords.js +60 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts +9 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/scalarProduct/scalarProductViaCos.js +67 -0
- package/lib/exercises/math/geometry/vectors/vectorCoordinatesFromTwoPoints.js +1 -1
- package/lib/exercises/math/percent/cmToEvolution.js +1 -1
- package/lib/exercises/math/powers/powersDivision.js +1 -1
- package/lib/exercises/math/powers/powersProduct.js +1 -1
- package/lib/exercises/math/probaStat/calculateProbaOfBinomialDistribution.js +1 -1
- package/lib/exercises/math/probaStat/conditionalProbability.js +1 -1
- package/lib/exercises/math/probaStat/expectedValueOfBinomialProba.js +1 -1
- package/lib/exercises/math/probaStat/varianceOfBinomialProba.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticExplicitFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindTerm.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricExplicitFormulaUsage.js +1 -1
- package/lib/exercises/math/sequences/geometric/geometricFindTerm.js +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorCoordinatesFromPoints.js +1 -1
- package/lib/exercises/math/spaceGeometry/vectors/spaceVectorNormCalculation.js +1 -1
- package/lib/exercises/math/trigonometry/arcValue.js +1 -1
- package/lib/exercises/pc/index.d.ts +3 -3
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +3 -3
- package/lib/index.d.ts +27 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/line.d.ts +1 -0
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +3 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +1 -0
- package/lib/math/polynomials/polynomial.js +1 -1
- package/lib/math/polynomials/trinom.d.ts +5 -0
- package/lib/math/polynomials/trinom.d.ts.map +1 -1
- package/lib/math/polynomials/trinom.js +12 -0
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +10 -12
- package/lib/prototypesEnhancement.d.ts +2 -1
- package/lib/prototypesEnhancement.d.ts.map +1 -1
- package/lib/prototypesEnhancement.js +2 -2
- package/lib/server.d.ts.map +1 -1
- package/lib/tree/nodes/node.d.ts +2 -0
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.d.ts +4 -3
- package/lib/tree/nodes/numbers/numberNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/numberNode.js +7 -3
- package/lib/tree/nodes/operators/addNode.d.ts +2 -2
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +12 -6
- package/lib/tree/nodes/operators/multiplyNode.d.ts +2 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +16 -11
- package/lib/tree/nodes/operators/substractNode.d.ts +4 -3
- package/lib/tree/nodes/operators/substractNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/substractNode.js +12 -5
- package/lib/tree/parsers/affineParser.d.ts +3 -0
- package/lib/tree/parsers/affineParser.d.ts.map +1 -0
- package/lib/tree/parsers/affineParser.js +26 -0
- package/lib/tree/parsers/monomParser.d.ts +2 -0
- package/lib/tree/parsers/monomParser.d.ts.map +1 -0
- package/lib/tree/parsers/monomParser.js +5 -0
- package/lib/types/keyIds.d.ts +1 -1
- package/lib/types/keyIds.d.ts.map +1 -1
- package/lib/utils/latex/alignTex.d.ts +2 -0
- package/lib/utils/latex/alignTex.d.ts.map +1 -0
- package/lib/utils/latex/alignTex.js +20 -0
- package/lib/utils/latex/colorize.d.ts +2 -0
- package/lib/utils/latex/colorize.d.ts.map +1 -0
- package/lib/utils/latex/colorize.js +9 -0
- package/package.json +4 -1
|
@@ -33,6 +33,9 @@ export type GeogebraOptions = {
|
|
|
33
33
|
xAxis?: GeogebraAxisOptions;
|
|
34
34
|
yAxis?: GeogebraAxisOptions;
|
|
35
35
|
};
|
|
36
|
+
export type KeyboardOptions = {
|
|
37
|
+
parenthesisShouldNotProduceLeftRight?: boolean;
|
|
38
|
+
};
|
|
36
39
|
export interface Question<TIdentifiers = {}> {
|
|
37
40
|
instruction: string;
|
|
38
41
|
hint?: string;
|
|
@@ -41,6 +44,7 @@ export interface Question<TIdentifiers = {}> {
|
|
|
41
44
|
answer?: string;
|
|
42
45
|
answerFormat?: "tex" | "raw";
|
|
43
46
|
ggbAnswer?: string[];
|
|
47
|
+
keyboardOptions?: KeyboardOptions;
|
|
44
48
|
keys?: (KeyId | KeyProps)[];
|
|
45
49
|
ggbOptions?: GeogebraOptions;
|
|
46
50
|
studentGgbOptions?: GeogebraOptions;
|
|
@@ -60,6 +64,15 @@ export type GGBVEA<TIdentifiers> = (studentAnswer: string[], args: {
|
|
|
60
64
|
ggbAnswer: string[];
|
|
61
65
|
} & TIdentifiers) => boolean;
|
|
62
66
|
export type QuestionGenerator<TIdentifiers = {}, TOptions = {}> = (opts?: TOptions) => Question<TIdentifiers>;
|
|
67
|
+
export type GetHint<TIdentifiers, TPreBuiltObjects = {}> = (args: TIdentifiers, objects?: TPreBuiltObjects) => string;
|
|
68
|
+
export type GetCorrection<TIdentifiers> = (args: TIdentifiers) => string;
|
|
69
|
+
export type GetInstruction<TIdentifiers> = (args: TIdentifiers) => string;
|
|
70
|
+
export type GetAnswer<TIdentifiers> = (args: TIdentifiers) => string;
|
|
71
|
+
export type GetKeys<TIdentifiers> = (args: TIdentifiers) => (KeyId | KeyProps)[];
|
|
72
|
+
export type GetGGBAnswer<TIdentifiers> = (args: TIdentifiers) => string[];
|
|
73
|
+
export type GetGGBOptions<TIdentifiers> = (args: TIdentifiers) => GeogebraOptions;
|
|
74
|
+
export type GetStudentGGBOptions<TIdentifiers> = (args: TIdentifiers) => GeogebraOptions;
|
|
75
|
+
export type RebuildIdentifiers<TIdentifiers> = (oldIdentifiers: any) => TIdentifiers;
|
|
63
76
|
export interface Exercise<TIdentifiers = {}> {
|
|
64
77
|
id: string;
|
|
65
78
|
isSingleStep: boolean;
|
|
@@ -82,6 +95,15 @@ export interface Exercise<TIdentifiers = {}> {
|
|
|
82
95
|
hasGeogebra?: boolean;
|
|
83
96
|
subject: "Mathématiques" | "Chimie" | "Physique";
|
|
84
97
|
hasHintAndCorrection?: boolean;
|
|
98
|
+
getInstruction?: GetInstruction<TIdentifiers>;
|
|
99
|
+
getHint?: GetHint<TIdentifiers>;
|
|
100
|
+
getCorrection?: GetCorrection<TIdentifiers>;
|
|
101
|
+
getKeys?: GetKeys<TIdentifiers>;
|
|
102
|
+
getAnswer?: GetAnswer<TIdentifiers>;
|
|
103
|
+
getGGBAnswer?: GetGGBAnswer<TIdentifiers>;
|
|
104
|
+
getGGBOptions?: GetGGBOptions<TIdentifiers>;
|
|
105
|
+
getStudentGGBOptions?: GetStudentGGBOptions<TIdentifiers>;
|
|
106
|
+
rebuildIdentifiers?: RebuildIdentifiers<TIdentifiers>;
|
|
85
107
|
}
|
|
86
108
|
export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
|
|
87
109
|
export type MathSection = "Aires" | "Arithmétique" | "Calcul littéral" | "Calculs" | "Combinatoire et dénombrement" | "Conversions" | "Dérivation" | "Droites" | "Ensembles et intervalles" | "Équations" | "Équations différentielles" | "Exponentielle" | "Fonction cube" | "Fonction inverse" | "Fonctions" | "Fonctions affines" | "Fonctions de référence" | "Fractions" | "Géométrie cartésienne" | "Géométrie euclidienne" | "Inéquations" | "Intégration" | "Limites" | "Logarithme népérien" | "Logarithme décimal" | "Matrices" | "Nombres complexes" | "Périmètres" | "Pourcentages" | "Primitives" | "Probabilités" | "Produit scalaire" | "Proportionnalité" | "Python" | "Puissances" | "Python" | "Racines carrées" | "Second degré" | "Statistiques" | "Suites" | "Systèmes" | "Théorème de Pythagore" | "Théorème de Thalès" | "Trigonométrie" | "Valeur absolue" | "Vecteurs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAA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,GACR,YAAY,GACZ,QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divisibiltyCriteria.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisibiltyCriteria.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AA0FF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,CAAC,WAAW,CAkBrD,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.divisibiltyCriteria = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const primes_1 = require("../../../../math/numbers/integer/primes");
|
|
7
|
+
const random_1 = require("../../../../utils/random");
|
|
8
|
+
const getPropositions = (n, { answer, divisor }) => {
|
|
9
|
+
const propositions = [];
|
|
10
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
11
|
+
if (divisor !== 6 && divisor !== 10)
|
|
12
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "2");
|
|
13
|
+
if (divisor !== 6 && divisor !== 9)
|
|
14
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "3");
|
|
15
|
+
if (divisor !== 5)
|
|
16
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "5");
|
|
17
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "6");
|
|
18
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "9");
|
|
19
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "10");
|
|
20
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
21
|
+
};
|
|
22
|
+
const getAnswer = (identifiers) => {
|
|
23
|
+
return identifiers.divisor + "";
|
|
24
|
+
};
|
|
25
|
+
const getInstruction = (identifiers) => {
|
|
26
|
+
return `Parmi les nombres suivants, lequel est un diviseur de $${identifiers.nb}$ ?`;
|
|
27
|
+
};
|
|
28
|
+
const getHint = (identifiers) => {
|
|
29
|
+
return `Voici les critères de divisibilité à connaître :
|
|
30
|
+
|
|
31
|
+
- Les nombres pairs (ceux qui finissent par $0$, $2$, $4$, $6$ ou $8$) sont divisibles par $2$ ;
|
|
32
|
+
- Si la somme des chiffres d'un nombre est dans la table de $3$, alors ce nombre est divisible par $3$ ;
|
|
33
|
+
- Si un nombre finit par $5$, alors il est divisible par $5$;
|
|
34
|
+
- Si un nombre est pair, et que la somme de ses chiffres est dans la table de $3$, alors il est divisible par $6$ ;
|
|
35
|
+
- Si la somme des chiffres d'un nombre est dans la table de $9$, alors il est divisible par $9$;
|
|
36
|
+
- Si un nombre finit par $0$, alors il est divisible par $10$.
|
|
37
|
+
`;
|
|
38
|
+
};
|
|
39
|
+
const getCorrection = ({ nb, divisor }) => {
|
|
40
|
+
const sum = nb
|
|
41
|
+
.toString()
|
|
42
|
+
.split("")
|
|
43
|
+
.reduce((acc, curr) => acc + Number(curr), 0);
|
|
44
|
+
switch (divisor) {
|
|
45
|
+
case 2:
|
|
46
|
+
return `$${nb}$ est pair, donc il est divisible par $2$.`;
|
|
47
|
+
case 3:
|
|
48
|
+
return `La somme des chiffres de $${nb}$ est : $${sum}$. Or $${sum}$ est dans la table de $3$, donc $${nb}$ est divisible par $3$.`;
|
|
49
|
+
case 5:
|
|
50
|
+
return `$${nb}$ finit par $5$, donc il est divisible par $5$.`;
|
|
51
|
+
case 6:
|
|
52
|
+
return `La somme des chiffres de $${nb}$ est : $${sum}$. Or $${sum}$ est dans la table de $3$. De plus, $${nb}$ est pair. Donc $${nb}$ est divisible par $6$.`;
|
|
53
|
+
case 9:
|
|
54
|
+
return `La somme des chiffres de $${nb}$ est : $${sum}$. Or $${sum}$ est dans la table de $9$, donc $${nb}$ est divisible par $9$.`;
|
|
55
|
+
case 10:
|
|
56
|
+
return `$${nb}$ finit par $0$, donc il est divisible par $10$.`;
|
|
57
|
+
}
|
|
58
|
+
return "";
|
|
59
|
+
};
|
|
60
|
+
const getKeys = (identifiers) => {
|
|
61
|
+
return [];
|
|
62
|
+
};
|
|
63
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
64
|
+
return ans === answer;
|
|
65
|
+
};
|
|
66
|
+
const getDivisibiltyCriteriaQuestion = () => {
|
|
67
|
+
/**
|
|
68
|
+
* 2x
|
|
69
|
+
* 3x
|
|
70
|
+
* 5x
|
|
71
|
+
* 6x
|
|
72
|
+
* 9x
|
|
73
|
+
* 10x
|
|
74
|
+
*/
|
|
75
|
+
const divisor = (0, random_1.random)([2, 3, 5, 6, 9, 10]);
|
|
76
|
+
const highPrime = (0, random_1.random)(primes_1.primes.slice(5));
|
|
77
|
+
const nb = divisor * highPrime;
|
|
78
|
+
const identifiers = { divisor, nb };
|
|
79
|
+
const question = {
|
|
80
|
+
answer: getAnswer(identifiers),
|
|
81
|
+
instruction: getInstruction(identifiers),
|
|
82
|
+
keys: getKeys(identifiers),
|
|
83
|
+
answerFormat: "tex",
|
|
84
|
+
identifiers,
|
|
85
|
+
hint: getHint(identifiers),
|
|
86
|
+
correction: getCorrection(identifiers),
|
|
87
|
+
};
|
|
88
|
+
return question;
|
|
89
|
+
};
|
|
90
|
+
exports.divisibiltyCriteria = {
|
|
91
|
+
id: "divisibiltyCriteria",
|
|
92
|
+
connector: "=",
|
|
93
|
+
label: "Utiliser les critères de divisibilité",
|
|
94
|
+
isSingleStep: true,
|
|
95
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDivisibiltyCriteriaQuestion, nb),
|
|
96
|
+
qcmTimer: 60,
|
|
97
|
+
freeTimer: 60,
|
|
98
|
+
ggbTimer: 60,
|
|
99
|
+
getPropositions,
|
|
100
|
+
isAnswerValid,
|
|
101
|
+
subject: "Mathématiques",
|
|
102
|
+
getHint,
|
|
103
|
+
getCorrection,
|
|
104
|
+
getAnswer,
|
|
105
|
+
hasHintAndCorrection: true,
|
|
106
|
+
answerType: "QCU",
|
|
107
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC"}
|
|
@@ -20,3 +20,4 @@ __exportStar(require("./primeNumbers"), exports);
|
|
|
20
20
|
__exportStar(require("./pgcdCalcul"), exports);
|
|
21
21
|
__exportStar(require("./divisorsList"), exports);
|
|
22
22
|
__exportStar(require("./commonDivisorsList"), exports);
|
|
23
|
+
__exportStar(require("./divisibiltyCriteria"), exports);
|
|
@@ -10,7 +10,7 @@ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
|
10
10
|
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
11
11
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
12
12
|
const operatorComposition_1 = require("../../../../tree/utilities/operatorComposition");
|
|
13
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
13
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
14
14
|
const getFractionsSumsSameDenominatorsQuestion = () => {
|
|
15
15
|
const denom = (0, randint_1.randint)(2, 15);
|
|
16
16
|
const num1 = (0, randint_1.randint)(1, denom + 10);
|
|
@@ -7,7 +7,7 @@ const affine_1 = require("../../../../math/polynomials/affine");
|
|
|
7
7
|
const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
8
8
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
9
9
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
10
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
11
11
|
const getCanonicalFormDevelopmentQuestion = () => {
|
|
12
12
|
const trinom = trinom_1.TrinomConstructor.randomCanonical();
|
|
13
13
|
const answer = trinom.toTree().toTex();
|
|
@@ -8,7 +8,7 @@ const randint_1 = require("../../../../math/utils/random/randint");
|
|
|
8
8
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
9
9
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
10
|
const operatorComposition_1 = require("../../../../tree/utilities/operatorComposition");
|
|
11
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
12
12
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
13
13
|
const getDoubleDistributivityQuestion = () => {
|
|
14
14
|
const affines = affine_1.AffineConstructor.differentRandoms(2, undefined, {
|
|
@@ -8,7 +8,7 @@ const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
|
8
8
|
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
9
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
12
12
|
const getDoubleDistributivityWithCoeffQuestion = () => {
|
|
13
13
|
const coeff = (0, randint_1.randint)(-10, 11, [-1, 0, 1]);
|
|
14
14
|
const affine1 = affine_1.AffineConstructor.random(undefined, {
|
|
@@ -9,7 +9,7 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
|
9
9
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
11
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
12
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
12
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
13
13
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
14
14
|
const getFirstIdentityQuestion = () => {
|
|
15
15
|
const affine = affine_1.AffineConstructor.random({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC"}
|
|
@@ -26,3 +26,4 @@ var thirdIdentity_1 = require("./thirdIdentity");
|
|
|
26
26
|
Object.defineProperty(exports, "thirdIdentity", { enumerable: true, get: function () { return thirdIdentity_1.thirdIdentity; } });
|
|
27
27
|
__exportStar(require("./doubleDistributivityWithCoeff"), exports);
|
|
28
28
|
__exportStar(require("./canonicalFormDevelopment"), exports);
|
|
29
|
+
__exportStar(require("./simpleDistriXCoeff"), exports);
|
|
@@ -10,7 +10,7 @@ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
|
10
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
11
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
12
12
|
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
13
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
13
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
14
14
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
15
15
|
const getSecondIdentityQuestion = () => {
|
|
16
16
|
const affine = affine_1.AffineConstructor.random({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simpleDistriXCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistriXCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8GF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAiBpD,CAAC"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.simpleDistriXCoeff = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
|
+
const trinom_1 = require("../../../../math/polynomials/trinom");
|
|
8
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
9
|
+
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
10
|
+
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
11
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
12
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
13
|
+
const buildFromIdentifiers = (identifiers) => { };
|
|
14
|
+
const getPropositions = (n, { answer, a, b, c }) => {
|
|
15
|
+
const propositions = [];
|
|
16
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
17
|
+
const affine = new affine_1.Affine(a, 0);
|
|
18
|
+
const affine2 = new affine_1.Affine(b, c);
|
|
19
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, affine.add(affine2).toTree().toTex());
|
|
20
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new trinom_1.Trinom(a * b, 0, c).toTree().toTex());
|
|
21
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, affine.multiply(affine2.opposite()).toTree().toTex());
|
|
22
|
+
while (propositions.length < n) {
|
|
23
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, trinom_1.TrinomConstructor.random(undefined, {
|
|
24
|
+
min: 0,
|
|
25
|
+
max: 1,
|
|
26
|
+
}, undefined)
|
|
27
|
+
.toTree()
|
|
28
|
+
.toTex());
|
|
29
|
+
}
|
|
30
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
31
|
+
};
|
|
32
|
+
const getAnswer = (identifiers) => {
|
|
33
|
+
const affine = new affine_1.Affine(identifiers.a, 0);
|
|
34
|
+
const affine2 = new affine_1.Affine(identifiers.b, identifiers.c);
|
|
35
|
+
return affine.multiply(affine2).toTree().toTex();
|
|
36
|
+
};
|
|
37
|
+
const getInstruction = (identifiers) => {
|
|
38
|
+
const affine = new affine_1.Affine(identifiers.a, 0);
|
|
39
|
+
const affine2 = new affine_1.Affine(identifiers.b, identifiers.c);
|
|
40
|
+
const statement = new multiplyNode_1.MultiplyNode(affine.toTree(), affine2.toTree());
|
|
41
|
+
return `Développer et réduire :
|
|
42
|
+
|
|
43
|
+
$$
|
|
44
|
+
${statement.toTex()}
|
|
45
|
+
$$
|
|
46
|
+
`;
|
|
47
|
+
};
|
|
48
|
+
const getHint = (identifiers) => {
|
|
49
|
+
const affine = new affine_1.Affine(identifiers.a, 0);
|
|
50
|
+
return `Multiplie chaque terme dans la parenthèse par $${affine
|
|
51
|
+
.toTree()
|
|
52
|
+
.toTex()}$.`;
|
|
53
|
+
};
|
|
54
|
+
const getCorrection = (identifiers) => {
|
|
55
|
+
const affine = new affine_1.Affine(identifiers.a, 0).toTree();
|
|
56
|
+
const affine2 = new affine_1.Affine(identifiers.b, identifiers.c).toTree();
|
|
57
|
+
const statement = new multiplyNode_1.MultiplyNode(affine, affine2);
|
|
58
|
+
const answer = getAnswer(identifiers);
|
|
59
|
+
return `${(0, alignTex_1.alignTex)([
|
|
60
|
+
[
|
|
61
|
+
statement.toTex(),
|
|
62
|
+
"=",
|
|
63
|
+
new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(affine, new affine_1.Affine(identifiers.b, 0).toTree(), {
|
|
64
|
+
forceTimesSign: true,
|
|
65
|
+
}), new multiplyNode_1.MultiplyNode(affine, new numberNode_1.NumberNode(identifiers.c), {
|
|
66
|
+
forceTimesSign: true,
|
|
67
|
+
})).toTex(),
|
|
68
|
+
],
|
|
69
|
+
["", "=", answer],
|
|
70
|
+
])}`;
|
|
71
|
+
};
|
|
72
|
+
const getKeys = (identifiers) => {
|
|
73
|
+
return ["x"];
|
|
74
|
+
};
|
|
75
|
+
const isAnswerValid = (ans, { answer, a, b, c }) => {
|
|
76
|
+
const affine = new affine_1.Affine(a, 0);
|
|
77
|
+
const affine2 = new affine_1.Affine(b, c);
|
|
78
|
+
const ansTree = affine.multiply(affine2).toTree();
|
|
79
|
+
return ansTree.toAllValidTexs().includes(ans);
|
|
80
|
+
};
|
|
81
|
+
const getSimpleDistriXCoeffQuestion = () => {
|
|
82
|
+
const a = (0, randint_1.randint)(-10, 11, [0]);
|
|
83
|
+
const b = (0, randint_1.randint)(-10, 11, [0]);
|
|
84
|
+
const c = (0, randint_1.randint)(-10, 11, [0]);
|
|
85
|
+
const identifiers = { a, b, c };
|
|
86
|
+
const question = {
|
|
87
|
+
answer: getAnswer(identifiers),
|
|
88
|
+
instruction: getInstruction(identifiers),
|
|
89
|
+
keys: getKeys(identifiers),
|
|
90
|
+
answerFormat: "tex",
|
|
91
|
+
identifiers,
|
|
92
|
+
hint: getHint(identifiers),
|
|
93
|
+
correction: getCorrection(identifiers),
|
|
94
|
+
};
|
|
95
|
+
return question;
|
|
96
|
+
};
|
|
97
|
+
exports.simpleDistriXCoeff = {
|
|
98
|
+
id: "simpleDistriXCoeff",
|
|
99
|
+
connector: "=",
|
|
100
|
+
label: "Distributivité du type $ax(bx+c)$",
|
|
101
|
+
isSingleStep: true,
|
|
102
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSimpleDistriXCoeffQuestion, nb),
|
|
103
|
+
qcmTimer: 60,
|
|
104
|
+
freeTimer: 60,
|
|
105
|
+
ggbTimer: 60,
|
|
106
|
+
getPropositions,
|
|
107
|
+
isAnswerValid,
|
|
108
|
+
subject: "Mathématiques",
|
|
109
|
+
getHint,
|
|
110
|
+
getCorrection,
|
|
111
|
+
getAnswer,
|
|
112
|
+
hasHintAndCorrection: true,
|
|
113
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"simpleDistributivity.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/simpleDistributivity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA8FF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAmBtD,CAAC"}
|
|
@@ -8,34 +8,55 @@ const randint_1 = require("../../../../math/utils/random/randint");
|
|
|
8
8
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
9
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
11
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
12
12
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
13
|
+
const buildStatement = (identifiers) => {
|
|
14
|
+
const { a, b, coeff } = identifiers;
|
|
15
|
+
const affine = new affine_1.Affine(a, b);
|
|
16
|
+
const statementTree = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), affine.toTree());
|
|
17
|
+
return statementTree;
|
|
18
|
+
};
|
|
19
|
+
const getInstruction = (identifiers) => {
|
|
20
|
+
const statementTex = buildStatement(identifiers).toTex();
|
|
21
|
+
return `Développer et réduire : $${statementTex}$`;
|
|
22
|
+
};
|
|
23
|
+
const getAnswer = (identifiers) => {
|
|
24
|
+
const { a, b, coeff } = identifiers;
|
|
25
|
+
const affine = new affine_1.Affine(a, b);
|
|
26
|
+
return affine.times(coeff).toTree().toTex();
|
|
27
|
+
};
|
|
28
|
+
const getHint = (identifiers) => {
|
|
29
|
+
return `Multiplie chaque terme dans la parenthèse par $${identifiers.coeff}$.`;
|
|
30
|
+
};
|
|
31
|
+
const getCorrection = (identifiers) => {
|
|
32
|
+
const { a, b, coeff } = identifiers;
|
|
33
|
+
const statement = buildStatement(identifiers);
|
|
34
|
+
const affine = new affine_1.Affine(a, b);
|
|
35
|
+
const answer = getAnswer(identifiers);
|
|
36
|
+
return `${(0, alignTex_1.alignTex)([
|
|
37
|
+
[
|
|
38
|
+
statement.toTex(),
|
|
39
|
+
"=",
|
|
40
|
+
new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(affine.a), "x".toTree()), { forceTimesSign: true }), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new numberNode_1.NumberNode(affine.b))).toTex(),
|
|
41
|
+
],
|
|
42
|
+
["", "=", answer],
|
|
43
|
+
])}`;
|
|
44
|
+
};
|
|
13
45
|
const getSimpleDistributivityQuestion = () => {
|
|
14
46
|
const affine = affine_1.AffineConstructor.random(undefined, {
|
|
15
47
|
excludes: [0],
|
|
16
48
|
});
|
|
17
49
|
const coeff = (0, randint_1.randint)(-10, 11, [-1, 0, 1]);
|
|
18
|
-
const
|
|
19
|
-
const answer = affine.times(coeff).toTree().toTex();
|
|
20
|
-
const statementTex = statementTree.toTex();
|
|
50
|
+
const identifiers = { a: affine.a, b: affine.b, coeff: coeff };
|
|
21
51
|
const question = {
|
|
22
|
-
instruction:
|
|
23
|
-
startStatement:
|
|
24
|
-
answer,
|
|
52
|
+
instruction: getInstruction(identifiers),
|
|
53
|
+
startStatement: buildStatement(identifiers).toTex(),
|
|
54
|
+
answer: getAnswer(identifiers),
|
|
25
55
|
keys: ["x"],
|
|
26
56
|
answerFormat: "tex",
|
|
27
|
-
identifiers
|
|
28
|
-
hint:
|
|
29
|
-
correction:
|
|
30
|
-
${(0, alignTex_1.alignTex)([
|
|
31
|
-
[
|
|
32
|
-
statementTex,
|
|
33
|
-
"=",
|
|
34
|
-
new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(affine.a), "x".toTree())), new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(coeff), new numberNode_1.NumberNode(affine.b))).toTex(),
|
|
35
|
-
],
|
|
36
|
-
["", "=", answer],
|
|
37
|
-
])}
|
|
38
|
-
`,
|
|
57
|
+
identifiers,
|
|
58
|
+
hint: getHint(identifiers),
|
|
59
|
+
correction: getCorrection(identifiers),
|
|
39
60
|
};
|
|
40
61
|
return question;
|
|
41
62
|
};
|
|
@@ -74,4 +95,8 @@ exports.simpleDistributivity = {
|
|
|
74
95
|
isAnswerValid,
|
|
75
96
|
subject: "Mathématiques",
|
|
76
97
|
hasHintAndCorrection: true,
|
|
98
|
+
getAnswer,
|
|
99
|
+
getCorrection,
|
|
100
|
+
getHint,
|
|
101
|
+
getInstruction,
|
|
77
102
|
};
|
|
@@ -7,7 +7,7 @@ const affine_1 = require("../../../../math/polynomials/affine");
|
|
|
7
7
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
8
8
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
9
9
|
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
10
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
10
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
11
11
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
12
12
|
const getThirdIdentityQuestion = () => {
|
|
13
13
|
const affine = affine_1.AffineConstructor.random(undefined, { excludes: [0] });
|
|
@@ -11,7 +11,7 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
|
11
11
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
12
12
|
const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
|
|
13
13
|
const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
|
|
14
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
14
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
15
15
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
16
16
|
const getEquationType1ExerciseQuestion = () => {
|
|
17
17
|
const b = (0, randint_1.randint)(-10, 11);
|
|
@@ -12,7 +12,7 @@ const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
|
|
|
12
12
|
const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
|
|
13
13
|
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
14
14
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
15
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
15
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
16
16
|
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
17
17
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
18
18
|
const getEquationType2ExerciseQuestion = () => {
|
|
@@ -13,7 +13,7 @@ const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode")
|
|
|
13
13
|
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
14
14
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
15
15
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
16
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
16
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
17
17
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
18
18
|
const getEquationType3ExerciseQuestion = () => {
|
|
19
19
|
const b = (0, randint_1.randint)(-10, 11, [0]);
|
|
@@ -11,7 +11,7 @@ const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equatio
|
|
|
11
11
|
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
12
12
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
13
13
|
const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
|
|
14
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
14
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
15
15
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
16
16
|
const getFirstDegreeEquation = () => {
|
|
17
17
|
const a = (0, randint_1.randint)(-30, 30, [0]);
|
|
@@ -9,7 +9,7 @@ const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
|
|
|
9
9
|
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
10
10
|
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
11
11
|
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
12
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
12
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
13
13
|
const getFirstDegreeEquationIntQuestion = () => {
|
|
14
14
|
const a = (0, randint_1.randint)(-15, 15, [0]);
|
|
15
15
|
const x = (0, randint_1.randint)(-15, 15, [0]);
|
|
@@ -9,7 +9,7 @@ const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
|
9
9
|
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
10
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
11
|
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
12
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
12
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
13
13
|
const getFirstDegreeEquationIntQuestion = () => {
|
|
14
14
|
const a = (0, randint_1.randint)(-15, 15, [0, 1]);
|
|
15
15
|
const x = (0, randint_1.randint)(-15, 15, [0]);
|
|
@@ -10,7 +10,7 @@ const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
|
|
|
10
10
|
const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equationSolutionNode");
|
|
11
11
|
const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
|
|
12
12
|
const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
|
|
13
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
13
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
14
14
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
15
15
|
const getFractionEquation = () => {
|
|
16
16
|
// (ax + b)/(cx + d) = 0
|
|
@@ -9,7 +9,7 @@ const randint_1 = require("../../../../math/utils/random/randint");
|
|
|
9
9
|
const equationSolutionNode_1 = require("../../../../tree/nodes/equations/equationSolutionNode");
|
|
10
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
11
|
const discreteSetNode_1 = require("../../../../tree/nodes/sets/discreteSetNode");
|
|
12
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
12
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
13
13
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
14
14
|
const getMultiplicationEquation = () => {
|
|
15
15
|
// (ax + b)(cx + d) = 0
|
|
@@ -9,7 +9,7 @@ const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
|
9
9
|
const addNode_1 = require("../../../../tree/nodes/operators/addNode");
|
|
10
10
|
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
11
11
|
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
12
|
-
const alignTex_1 = require("../../../../utils/alignTex");
|
|
12
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
13
13
|
const shuffle_1 = require("../../../../utils/shuffle");
|
|
14
14
|
const getFactoType1Question = () => {
|
|
15
15
|
const affine = affine_1.AffineConstructor.random({ min: 1, max: 10 }, {
|