math-exercises 1.4.15 → 1.4.17
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/calcul/arithmetics/paritySumsAndProducts.d.ts +4 -0
- package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.d.ts.map +1 -0
- package/lib/exercises/calcul/arithmetics/paritySumsAndProducts.js +113 -0
- package/lib/exercises/combinatory/anagrams.d.ts +4 -0
- package/lib/exercises/combinatory/anagrams.d.ts.map +1 -0
- package/lib/exercises/combinatory/anagrams.js +128 -0
- package/lib/exercises/combinatory/ballsCounting.d.ts +4 -0
- package/lib/exercises/combinatory/ballsCounting.d.ts.map +1 -0
- package/lib/exercises/combinatory/ballsCounting.js +124 -0
- package/lib/exercises/combinatory/diceCounting.d.ts +4 -0
- package/lib/exercises/combinatory/diceCounting.d.ts.map +1 -0
- package/lib/exercises/combinatory/diceCounting.js +134 -0
- package/lib/exercises/derivation/derivative/productDerivative.d.ts +4 -0
- package/lib/exercises/derivation/derivative/productDerivative.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/productDerivative.js +62 -0
- package/lib/exercises/derivation/derivative/quotientDerivative.d.ts +4 -0
- package/lib/exercises/derivation/derivative/quotientDerivative.d.ts.map +1 -0
- package/lib/exercises/derivation/derivative/quotientDerivative.js +65 -0
- package/lib/exercises/exercise.d.ts +1 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercises.d.ts.map +1 -1
- package/lib/exercises/exercises.js +58 -26
- package/lib/exercises/functions/absolute/absoluteValueEquations.d.ts +4 -0
- package/lib/exercises/functions/absolute/absoluteValueEquations.d.ts.map +1 -0
- package/lib/exercises/functions/absolute/absoluteValueEquations.js +75 -0
- package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts +4 -0
- package/lib/exercises/functions/absolute/absoluteValueInequations.d.ts.map +1 -0
- package/lib/exercises/functions/absolute/absoluteValueInequations.js +67 -0
- package/lib/exercises/geometry/vectors/coordinatesReading.d.ts +4 -0
- package/lib/exercises/geometry/vectors/coordinatesReading.d.ts.map +1 -0
- package/lib/exercises/geometry/vectors/coordinatesReading.js +81 -0
- package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts +4 -0
- package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.d.ts.map +1 -0
- package/lib/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.js +68 -0
- package/lib/exercises/percent/evolutionToCM.d.ts +4 -0
- package/lib/exercises/percent/evolutionToCM.d.ts.map +1 -0
- package/lib/exercises/percent/evolutionToCM.js +74 -0
- package/lib/exercises/sequences/explicitFormulaUsage.d.ts +22 -0
- package/lib/exercises/sequences/explicitFormulaUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/explicitFormulaUsage.js +82 -0
- package/lib/exercises/sequences/genericSequenceVariations.d.ts +4 -0
- package/lib/exercises/sequences/genericSequenceVariations.d.ts.map +1 -0
- package/lib/exercises/sequences/genericSequenceVariations.js +55 -0
- package/lib/exercises/sequences/recurrenceFormulaUsage.d.ts +4 -0
- package/lib/exercises/sequences/recurrenceFormulaUsage.d.ts.map +1 -0
- package/lib/exercises/sequences/recurrenceFormulaUsage.js +69 -0
- package/lib/exercises/utils/geogebra/getAdaptedCoords.d.ts +1 -0
- package/lib/exercises/utils/geogebra/getAdaptedCoords.d.ts.map +1 -0
- package/lib/exercises/utils/geogebra/getAdaptedCoords.js +1 -0
- package/lib/math/geometry/point.d.ts +2 -0
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +8 -0
- package/lib/math/polynomials/polynomial.d.ts +7 -0
- package/lib/math/polynomials/polynomial.d.ts.map +1 -1
- package/lib/math/polynomials/polynomial.js +7 -0
- package/lib/math/sequences/sequence.d.ts +3 -1
- package/lib/math/sequences/sequence.d.ts.map +1 -1
- package/lib/math/sequences/sequence.js +2 -1
- package/lib/types/keyIds.d.ts +6 -4
- package/lib/types/keyIds.d.ts.map +1 -1
- package/lib/utils/randomLetter.d.ts +2 -0
- package/lib/utils/randomLetter.d.ts.map +1 -0
- package/lib/utils/randomLetter.js +9 -0
- package/package.json +1 -2
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getProductDerivativeQuestion = exports.quotientDerivative = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
7
|
+
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
8
|
+
const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
|
|
9
|
+
const powerNode_1 = require("../../../tree/nodes/operators/powerNode");
|
|
10
|
+
const uuid_1 = require("uuid");
|
|
11
|
+
exports.quotientDerivative = {
|
|
12
|
+
id: 'quotientDerivative',
|
|
13
|
+
connector: '=',
|
|
14
|
+
instruction: '',
|
|
15
|
+
label: "Dérivée d'un quotient de polynômes",
|
|
16
|
+
levels: ['1reSpé', 'MathComp'],
|
|
17
|
+
isSingleStep: true,
|
|
18
|
+
sections: ['Dérivation'],
|
|
19
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getProductDerivativeQuestion, nb),
|
|
20
|
+
qcmTimer: 60,
|
|
21
|
+
freeTimer: 60,
|
|
22
|
+
};
|
|
23
|
+
function getProductDerivativeQuestion() {
|
|
24
|
+
const poly1 = polynomial_1.PolynomialConstructor.randomWithLength(2, 2);
|
|
25
|
+
const poly2 = polynomial_1.PolynomialConstructor.randomWithLength(2, 2);
|
|
26
|
+
const answerNum = poly1.derivate().multiply(poly2).add(poly1.opposite().multiply(poly2.derivate())).toTree().toTex();
|
|
27
|
+
const answerDenum = new powerNode_1.PowerNode(poly2.toTree(), new numberNode_1.NumberNode(2)).toTex();
|
|
28
|
+
const answer = `\\frac{${answerNum}}{${answerDenum}}`;
|
|
29
|
+
const getPropositions = (n) => {
|
|
30
|
+
const res = [];
|
|
31
|
+
res.push({
|
|
32
|
+
id: (0, uuid_1.v4)(),
|
|
33
|
+
statement: answer,
|
|
34
|
+
isRightAnswer: true,
|
|
35
|
+
format: 'tex',
|
|
36
|
+
});
|
|
37
|
+
(0, exercise_1.tryToAddWrongProp)(res, `\\frac{${poly1.derivate().toTree().toTex()}}{${poly2.derivate().toTree().toTex()}}`);
|
|
38
|
+
const missing = n - res.length;
|
|
39
|
+
for (let i = 0; i < missing; i++) {
|
|
40
|
+
let isDuplicate;
|
|
41
|
+
let proposition;
|
|
42
|
+
do {
|
|
43
|
+
const wrongAnswer = `\\frac{${polynomial_1.PolynomialConstructor.random(2).toTree().toTex()}}{${answerDenum}}`;
|
|
44
|
+
proposition = {
|
|
45
|
+
id: (0, uuid_1.v4)() + ``,
|
|
46
|
+
statement: wrongAnswer,
|
|
47
|
+
isRightAnswer: false,
|
|
48
|
+
format: 'tex',
|
|
49
|
+
};
|
|
50
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
51
|
+
} while (isDuplicate);
|
|
52
|
+
res.push(proposition);
|
|
53
|
+
}
|
|
54
|
+
return (0, exercise_1.shuffleProps)(res, n);
|
|
55
|
+
};
|
|
56
|
+
const question = {
|
|
57
|
+
answer,
|
|
58
|
+
instruction: `Déterminer la dérivée de la fonction $f$ définie par $f(x) = ${new fractionNode_1.FractionNode(poly1.toTree(), poly2.toTree()).toTex()}$`,
|
|
59
|
+
keys: ['x', 'xsquare', 'xcube'],
|
|
60
|
+
getPropositions,
|
|
61
|
+
answerFormat: 'tex',
|
|
62
|
+
};
|
|
63
|
+
return question;
|
|
64
|
+
}
|
|
65
|
+
exports.getProductDerivativeQuestion = getProductDerivativeQuestion;
|
|
@@ -36,5 +36,5 @@ export interface MathExercise {
|
|
|
36
36
|
freeTimer: number;
|
|
37
37
|
}
|
|
38
38
|
export type MathLevel = '6ème' | '5ème' | '4ème' | '3ème' | '2nde' | '1reTech' | '1reESM' | '1reSpé' | 'TermSpé' | 'TermTech' | 'MathExp' | 'MathComp' | 'CAP' | '2ndPro' | '1rePro' | 'TermPro';
|
|
39
|
-
export type MathSection = 'Arithmétique' | 'Calcul littéral' | 'Calculs' | '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' | 'Nombres complexes' | 'Pourcentages' | 'Primitives' | 'Probabilités' | 'Proportionnalité' | 'Puissances' | 'Racines carrées' | 'Second degré' | 'Statistiques' | 'Suites' | 'Trigonométrie' | 'Vecteurs';
|
|
39
|
+
export type MathSection = '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' | 'Nombres complexes' | 'Pourcentages' | 'Primitives' | 'Probabilités' | 'Proportionnalité' | 'Puissances' | 'Racines carrées' | 'Second degré' | 'Statistiques' | 'Suites' | 'Trigonométrie' | 'Valeur absolue' | 'Vecteurs';
|
|
40
40
|
//# sourceMappingURL=exercise.d.ts.map
|
|
@@ -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;AAI3C,eAAO,MAAM,iBAAiB,UAAW,WAAW,EAAE,aAAa,MAAM,WAAU,KAAK,GAAG,KAAK,SAS/F,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;AACF,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,cAAc,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACvC,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC;IACvC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;IAC9D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,mBAAmB,GACnB,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,YAAY,GACZ,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,eAAe,GACf,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAI3C,eAAO,MAAM,iBAAiB,UAAW,WAAW,EAAE,aAAa,MAAM,WAAU,KAAK,GAAG,KAAK,SAS/F,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;AACF,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,KAAK,GAAG,KAAK,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,cAAc,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACvC,eAAe,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;CAC/C;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC;IACvC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IACf,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,QAAQ,EAAE,CAAC;IAC9D,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,iBAAiB,GACjB,SAAS,GACT,8BAA8B,GAC9B,aAAa,GACb,YAAY,GACZ,SAAS,GACT,0BAA0B,GAC1B,WAAW,GACX,2BAA2B,GAC3B,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,WAAW,GACX,mBAAmB,GACnB,wBAAwB,GACxB,WAAW,GACX,uBAAuB,GACvB,uBAAuB,GACvB,aAAa,GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,mBAAmB,GACnB,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,YAAY,GACZ,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"AAkLA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"exercises.d.ts","sourceRoot":"","sources":["../../src/exercises/exercises.ts"],"names":[],"mappings":"AAkLA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA4B1C,eAAO,MAAM,SAAS,EAAE,YAAY,EAgSnC,CAAC"}
|
|
@@ -182,6 +182,20 @@ const niceRootsFromDevForm_1 = require("./functions/trinoms/niceRootsFromDevForm
|
|
|
182
182
|
const diceBasicProbas_1 = require("./probaStat/diceBasicProbas");
|
|
183
183
|
const cardBasicProbas_1 = require("./probaStat/cardBasicProbas");
|
|
184
184
|
const ballsBasicProbas_1 = require("./probaStat/ballsBasicProbas");
|
|
185
|
+
const coordinatesReading_1 = require("./geometry/vectors/coordinatesReading");
|
|
186
|
+
const anagrams_1 = require("./combinatory/anagrams");
|
|
187
|
+
const ballsCounting_1 = require("./combinatory/ballsCounting");
|
|
188
|
+
const diceCounting_1 = require("./combinatory/diceCounting");
|
|
189
|
+
const paritySumsAndProducts_1 = require("./calcul/arithmetics/paritySumsAndProducts");
|
|
190
|
+
const recurrenceFormulaUsage_1 = require("./sequences/recurrenceFormulaUsage");
|
|
191
|
+
const explicitFormulaUsage_1 = require("./sequences/explicitFormulaUsage");
|
|
192
|
+
const genericSequenceVariations_1 = require("./sequences/genericSequenceVariations");
|
|
193
|
+
const vectorCoordinatesFromTwoPoints_1 = require("./geometry/vectors/vectorCoordinatesFromTwoPoints");
|
|
194
|
+
const evolutionToCM_1 = require("./percent/evolutionToCM");
|
|
195
|
+
const absoluteValueEquations_1 = require("./functions/absolute/absoluteValueEquations");
|
|
196
|
+
const absoluteValueInequations_1 = require("./functions/absolute/absoluteValueInequations");
|
|
197
|
+
const productDerivative_1 = require("./derivation/derivative/productDerivative");
|
|
198
|
+
const quotientDerivative_1 = require("./derivation/derivative/quotientDerivative");
|
|
185
199
|
exports.exercises = [
|
|
186
200
|
/**
|
|
187
201
|
* calcul litteral
|
|
@@ -205,6 +219,8 @@ exports.exercises = [
|
|
|
205
219
|
equationType4Exercise_1.equationType4Exercise,
|
|
206
220
|
firstDegreeEquation_1.firstDegreeEquation,
|
|
207
221
|
equationSimpleSquare_1.equationSimpleSquare,
|
|
222
|
+
multiplicationEquation_1.multiplicationEquation,
|
|
223
|
+
fractionEquation_1.fractionEquation,
|
|
208
224
|
/**
|
|
209
225
|
* inequations
|
|
210
226
|
*/
|
|
@@ -234,6 +250,10 @@ exports.exercises = [
|
|
|
234
250
|
addAndSubWithoutRelatives_1.addAndSubWithoutRelatives,
|
|
235
251
|
operationsPriorities_1.operationsPriorities,
|
|
236
252
|
operationsPrioritiesWithoutRelative_1.operationsPrioritiesWithoutRelative,
|
|
253
|
+
mentalAddAndSub_1.mentalAddAndSub,
|
|
254
|
+
mentalMultiplications_1.mentalMultiplications,
|
|
255
|
+
mentalDivisions_1.mentalDivisions,
|
|
256
|
+
mentalPercentage_1.mentalPercentage,
|
|
237
257
|
/**
|
|
238
258
|
* rounding
|
|
239
259
|
*/
|
|
@@ -249,6 +269,7 @@ exports.exercises = [
|
|
|
249
269
|
globalPercent_1.globalPercent,
|
|
250
270
|
reciprocalPercentage_1.reciprocalPercentage,
|
|
251
271
|
averageEvolutionRate_1.averageEvolutionRate,
|
|
272
|
+
evolutionToCM_1.evolutionToCM,
|
|
252
273
|
/**
|
|
253
274
|
* geometry
|
|
254
275
|
*/
|
|
@@ -264,12 +285,23 @@ exports.exercises = [
|
|
|
264
285
|
trigonometrySideCalcul_1.trigonometrySideCalcul,
|
|
265
286
|
rightTriangleArea_1.rightTriangleArea,
|
|
266
287
|
triangleArea_1.triangleArea,
|
|
288
|
+
rectangleArea_1.rectangleArea,
|
|
289
|
+
rectanglePerimeter_1.rectanglePerimeter,
|
|
290
|
+
squareArea_1.squareArea,
|
|
291
|
+
squarePerimeter_1.squarePerimeter,
|
|
292
|
+
triangleAreaV2_1.triangleAreaV2,
|
|
293
|
+
trianglePerimeter_1.trianglePerimeter,
|
|
294
|
+
circleArea_1.circleArea,
|
|
295
|
+
circleCircumference_1.circleCircumference,
|
|
296
|
+
distanceBetweenTwoPoints_1.distanceBetweenTwoPoints,
|
|
267
297
|
/**
|
|
268
298
|
* vectors
|
|
269
299
|
*/
|
|
270
300
|
scalarProductViaCoords_1.scalarProductViaCoords,
|
|
271
301
|
determinant_1.determinant,
|
|
272
302
|
chasles_1.chasles,
|
|
303
|
+
coordinatesReading_1.coordinatesReading,
|
|
304
|
+
vectorCoordinatesFromTwoPoints_1.vectorCoordinatesFromTwoPoints,
|
|
273
305
|
/**
|
|
274
306
|
* puissances
|
|
275
307
|
*/
|
|
@@ -301,6 +333,9 @@ exports.exercises = [
|
|
|
301
333
|
arithmeticThresholdFind_1.arithmeticThresholdFind,
|
|
302
334
|
firstIntegersSum_1.firstIntegersSum,
|
|
303
335
|
geometricFirstTermsSum_1.geometricFirstTermsSum,
|
|
336
|
+
recurrenceFormulaUsage_1.recurrenceFormulaUsage,
|
|
337
|
+
explicitFormulaUsage_1.explicitFormulaUsage,
|
|
338
|
+
genericSequenceVariations_1.genericSequenceVariations,
|
|
304
339
|
/**
|
|
305
340
|
* fonctions
|
|
306
341
|
*/
|
|
@@ -327,8 +362,10 @@ exports.exercises = [
|
|
|
327
362
|
expDerivativeOne_1.expDerivativeOne,
|
|
328
363
|
expDerivativeTwo_1.expDerivativeTwo,
|
|
329
364
|
expDerivativeThree_1.expDerivativeThree,
|
|
365
|
+
productDerivative_1.productDerivative,
|
|
366
|
+
quotientDerivative_1.quotientDerivative,
|
|
330
367
|
/**
|
|
331
|
-
* primitive
|
|
368
|
+
* primitive and equa diff
|
|
332
369
|
*/
|
|
333
370
|
constantPrimitive_1.constantPrimitive,
|
|
334
371
|
polynomialPrimitive_1.polynomialPrimitive,
|
|
@@ -336,6 +373,8 @@ exports.exercises = [
|
|
|
336
373
|
exponentialPrimitive_1.exponentialPrimitive,
|
|
337
374
|
logarithmePrimitive_1.logarithmePrimitive,
|
|
338
375
|
usualPrimitives_1.usualPrimitives,
|
|
376
|
+
equaDiffGeneralForme_1.exponentialDifferentialEquation,
|
|
377
|
+
equaDiffGeneralFormeWithIC_1.exponentialDifferentialEquationWithIC,
|
|
339
378
|
/**
|
|
340
379
|
* probabilités
|
|
341
380
|
*/
|
|
@@ -344,39 +383,21 @@ exports.exercises = [
|
|
|
344
383
|
diceBasicProbas_1.diceBasicProbas,
|
|
345
384
|
cardBasicProbas_1.cardBasicProbas,
|
|
346
385
|
ballsBasicProbas_1.ballsBasicProbas,
|
|
386
|
+
/**arithmetic */
|
|
387
|
+
primeNumbers_1.primeNumbers,
|
|
388
|
+
paritySumsAndProducts_1.paritySumsAndProducts,
|
|
389
|
+
euclideanDivision_1.euclideanDivision,
|
|
347
390
|
/**
|
|
348
391
|
* islam
|
|
349
392
|
*/
|
|
350
393
|
leadingCoefficient_1.leadingCoefficient,
|
|
351
394
|
fractionToPercentToDecimal_1.fractionToPercentToDecimal,
|
|
352
395
|
marginalAndConditionalFrequency_1.marginalAndConditionalFrequency,
|
|
353
|
-
mentalAddAndSub_1.mentalAddAndSub,
|
|
354
|
-
mentalMultiplications_1.mentalMultiplications,
|
|
355
|
-
mentalDivisions_1.mentalDivisions,
|
|
356
|
-
mentalPercentage_1.mentalPercentage,
|
|
357
396
|
/**
|
|
358
397
|
* nv generateurs
|
|
359
398
|
*/
|
|
360
|
-
capacityConversion_1.capacityConversion,
|
|
361
|
-
lengthConversion_1.lengthConversion,
|
|
362
|
-
massConversion_1.massConversion,
|
|
363
|
-
aeraConversion_1.aeraConversion,
|
|
364
|
-
volumeConversion_1.volumeConversion,
|
|
365
|
-
volumeCapacityConversion_1.volumeCapacityConversion,
|
|
366
|
-
primeNumbers_1.primeNumbers,
|
|
367
|
-
multiplicationEquation_1.multiplicationEquation,
|
|
368
|
-
fractionEquation_1.fractionEquation,
|
|
369
399
|
leadingCoefficientCalculV1_1.leadingCoefficientCalculV1,
|
|
370
400
|
leadingCoefficientCalculV2_1.leadingCoefficientCalculV2,
|
|
371
|
-
rectangleArea_1.rectangleArea,
|
|
372
|
-
rectanglePerimeter_1.rectanglePerimeter,
|
|
373
|
-
squareArea_1.squareArea,
|
|
374
|
-
squarePerimeter_1.squarePerimeter,
|
|
375
|
-
triangleAreaV2_1.triangleAreaV2,
|
|
376
|
-
trianglePerimeter_1.trianglePerimeter,
|
|
377
|
-
circleArea_1.circleArea,
|
|
378
|
-
circleCircumference_1.circleCircumference,
|
|
379
|
-
distanceBetweenTwoPoints_1.distanceBetweenTwoPoints,
|
|
380
401
|
reduceExpression_1.reduceExpression,
|
|
381
402
|
evaluateExpression_1.evaluateExpression,
|
|
382
403
|
proportionalityTable_1.proportionalityTable,
|
|
@@ -384,11 +405,15 @@ exports.exercises = [
|
|
|
384
405
|
expEquation_1.expEquation,
|
|
385
406
|
expSimplifiying_1.expSimplifiying,
|
|
386
407
|
logSimplifiying_1.logSimplifiying,
|
|
387
|
-
euclideanDivision_1.euclideanDivision,
|
|
388
408
|
signFunction_1.signFunction,
|
|
389
409
|
thirdDegreeFunctionVariation_1.thirdDegreeFunctionVariation,
|
|
390
|
-
|
|
391
|
-
|
|
410
|
+
/**conversions */
|
|
411
|
+
capacityConversion_1.capacityConversion,
|
|
412
|
+
lengthConversion_1.lengthConversion,
|
|
413
|
+
massConversion_1.massConversion,
|
|
414
|
+
aeraConversion_1.aeraConversion,
|
|
415
|
+
volumeConversion_1.volumeConversion,
|
|
416
|
+
volumeCapacityConversion_1.volumeCapacityConversion,
|
|
392
417
|
/**Stats */
|
|
393
418
|
averageWithTable_1.averageWithTable,
|
|
394
419
|
medianList_1.medianWithList,
|
|
@@ -430,4 +455,11 @@ exports.exercises = [
|
|
|
430
455
|
sequenceRationalFracLimit_1.sequenceRationalFracLimit,
|
|
431
456
|
sequencePolynomProductLimit_1.sequencePolynomProductLimit,
|
|
432
457
|
sequenceGeometricLimit_1.sequenceGeometricLimit,
|
|
458
|
+
/**combinatory */
|
|
459
|
+
anagrams_1.anagrams,
|
|
460
|
+
ballsCounting_1.ballsCounting,
|
|
461
|
+
diceCounting_1.diceCounting,
|
|
462
|
+
/**valeur absolue */
|
|
463
|
+
absoluteValueEquations_1.absoluteValueEquations,
|
|
464
|
+
absoluteValueInequations_1.absoluteValueInequations,
|
|
433
465
|
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"absoluteValueEquations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/absolute/absoluteValueEquations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAe,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAShH,eAAO,MAAM,sBAAsB,EAAE,YAWpC,CAAC;AAEF,wBAAgB,iCAAiC,IAAI,QAAQ,CAwD5D"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAbsoluteValueEquationsQuestion = exports.absoluteValueEquations = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
9
|
+
const probaFlip_1 = require("../../../utils/probaFlip");
|
|
10
|
+
const uuid_1 = require("uuid");
|
|
11
|
+
exports.absoluteValueEquations = {
|
|
12
|
+
id: 'absoluteValueEquation',
|
|
13
|
+
connector: '\\iff',
|
|
14
|
+
instruction: '',
|
|
15
|
+
label: 'Résoudre une équation avec valeur absolue',
|
|
16
|
+
levels: ['2nde', '1reESM'],
|
|
17
|
+
isSingleStep: true,
|
|
18
|
+
sections: ['Valeur absolue', 'Équations'],
|
|
19
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAbsoluteValueEquationsQuestion, nb),
|
|
20
|
+
qcmTimer: 60,
|
|
21
|
+
freeTimer: 60,
|
|
22
|
+
};
|
|
23
|
+
function getAbsoluteValueEquationsQuestion() {
|
|
24
|
+
const poly = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10, [0]), 1]);
|
|
25
|
+
const a = (0, probaFlip_1.probaFlip)(0.9) ? (0, randint_1.randint)(1, 10) : (0, coinFlip_1.coinFlip)() ? 0 : (0, randint_1.randint)(-9, 0);
|
|
26
|
+
//|x-b| = a
|
|
27
|
+
const b = -poly.coefficients[0];
|
|
28
|
+
const answer = a === 0 ? `S=\\left\\{${b}\\right\\}` : a < 0 ? `S=\\emptyset` : `S=\\left\\{${b - a};${b + a}\\right\\}`;
|
|
29
|
+
const getPropositions = (n) => {
|
|
30
|
+
const res = [];
|
|
31
|
+
res.push({
|
|
32
|
+
id: (0, uuid_1.v4)(),
|
|
33
|
+
statement: answer,
|
|
34
|
+
isRightAnswer: true,
|
|
35
|
+
format: 'tex',
|
|
36
|
+
});
|
|
37
|
+
if (a < 0) {
|
|
38
|
+
(0, exercise_1.tryToAddWrongProp)(res, `S=\\left\\{${b - a};${b + a}\\right\\}`);
|
|
39
|
+
(0, exercise_1.tryToAddWrongProp)(res, `S=\\left\\{${b + a}\\right\\}`);
|
|
40
|
+
}
|
|
41
|
+
else if (a === 0) {
|
|
42
|
+
(0, exercise_1.tryToAddWrongProp)(res, `S=\\emptyset`);
|
|
43
|
+
}
|
|
44
|
+
else if (a > 0) {
|
|
45
|
+
(0, exercise_1.tryToAddWrongProp)(res, `S=\\left\\{${b + a}\\right\\}`);
|
|
46
|
+
(0, exercise_1.tryToAddWrongProp)(res, `S=\\left\\{${-b - a};${-b + a}\\right\\}`);
|
|
47
|
+
}
|
|
48
|
+
const missing = n - res.length;
|
|
49
|
+
for (let i = 0; i < missing; i++) {
|
|
50
|
+
let isDuplicate;
|
|
51
|
+
let proposition;
|
|
52
|
+
do {
|
|
53
|
+
const wrongAnswer = `S=\\left\\{${(0, randint_1.randint)(-9, 0)};${(0, randint_1.randint)(0, 10)}\\right\\}`;
|
|
54
|
+
proposition = {
|
|
55
|
+
id: (0, uuid_1.v4)() + ``,
|
|
56
|
+
statement: wrongAnswer,
|
|
57
|
+
isRightAnswer: false,
|
|
58
|
+
format: 'tex',
|
|
59
|
+
};
|
|
60
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
61
|
+
} while (isDuplicate);
|
|
62
|
+
res.push(proposition);
|
|
63
|
+
}
|
|
64
|
+
return (0, exercise_1.shuffleProps)(res, n);
|
|
65
|
+
};
|
|
66
|
+
const question = {
|
|
67
|
+
answer: answer,
|
|
68
|
+
instruction: `Résoudre l'équation $|${poly.toTree().toTex()}| = ${a}$.`,
|
|
69
|
+
keys: ['S', 'equal', 'emptyset', 'lbrace', 'semicolon', 'rbrace'],
|
|
70
|
+
getPropositions,
|
|
71
|
+
answerFormat: 'tex',
|
|
72
|
+
};
|
|
73
|
+
return question;
|
|
74
|
+
}
|
|
75
|
+
exports.getAbsoluteValueEquationsQuestion = getAbsoluteValueEquationsQuestion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"absoluteValueInequations.d.ts","sourceRoot":"","sources":["../../../../src/exercises/functions/absolute/absoluteValueInequations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAe,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAOhH,eAAO,MAAM,wBAAwB,EAAE,YAWtC,CAAC;AAEF,wBAAgB,mCAAmC,IAAI,QAAQ,CAoD9D"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAbsoluteValueInequationsQuestion = exports.absoluteValueInequations = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const polynomial_1 = require("../../../math/polynomials/polynomial");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const coinFlip_1 = require("../../../utils/coinFlip");
|
|
9
|
+
const uuid_1 = require("uuid");
|
|
10
|
+
exports.absoluteValueInequations = {
|
|
11
|
+
id: 'absoluteValueInequations',
|
|
12
|
+
connector: '\\iff',
|
|
13
|
+
instruction: '',
|
|
14
|
+
label: 'Résoudre une inéquation avec valeur absolue',
|
|
15
|
+
levels: ['2nde', '1reESM'],
|
|
16
|
+
isSingleStep: true,
|
|
17
|
+
sections: ['Valeur absolue', 'Inéquations', 'Ensembles et intervalles'],
|
|
18
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAbsoluteValueInequationsQuestion, nb),
|
|
19
|
+
qcmTimer: 60,
|
|
20
|
+
freeTimer: 60,
|
|
21
|
+
};
|
|
22
|
+
function getAbsoluteValueInequationsQuestion() {
|
|
23
|
+
const poly = new polynomial_1.Polynomial([(0, randint_1.randint)(-9, 10, [0]), 1]);
|
|
24
|
+
const a = (0, randint_1.randint)(1, 10);
|
|
25
|
+
//|x-b| <= a
|
|
26
|
+
const b = -poly.coefficients[0];
|
|
27
|
+
const isStrict = (0, coinFlip_1.coinFlip)();
|
|
28
|
+
const answer = isStrict ? `S=]${b - a};${b + a}[` : `S=[${b - a};${b + a}]`;
|
|
29
|
+
const getPropositions = (n) => {
|
|
30
|
+
const res = [];
|
|
31
|
+
res.push({
|
|
32
|
+
id: (0, uuid_1.v4)(),
|
|
33
|
+
statement: answer,
|
|
34
|
+
isRightAnswer: true,
|
|
35
|
+
format: 'tex',
|
|
36
|
+
});
|
|
37
|
+
(0, exercise_1.tryToAddWrongProp)(res, `S=]${b - a};${b + a}[`);
|
|
38
|
+
(0, exercise_1.tryToAddWrongProp)(res, `S=[${b - a};${b + a}]`);
|
|
39
|
+
(0, exercise_1.tryToAddWrongProp)(res, `S=\\left\\{${b - a};${b + a}\\right\\}`);
|
|
40
|
+
const missing = n - res.length;
|
|
41
|
+
for (let i = 0; i < missing; i++) {
|
|
42
|
+
let isDuplicate;
|
|
43
|
+
let proposition;
|
|
44
|
+
do {
|
|
45
|
+
const wrongAnswer = `S=[${(0, randint_1.randint)(-9, 0)};${(0, randint_1.randint)(0, 10)}]`;
|
|
46
|
+
proposition = {
|
|
47
|
+
id: (0, uuid_1.v4)() + ``,
|
|
48
|
+
statement: wrongAnswer,
|
|
49
|
+
isRightAnswer: false,
|
|
50
|
+
format: 'tex',
|
|
51
|
+
};
|
|
52
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
53
|
+
} while (isDuplicate);
|
|
54
|
+
res.push(proposition);
|
|
55
|
+
}
|
|
56
|
+
return (0, exercise_1.shuffleProps)(res, n);
|
|
57
|
+
};
|
|
58
|
+
const question = {
|
|
59
|
+
answer,
|
|
60
|
+
instruction: `Résoudre l'inéquation $|${poly.toTree().toTex()}|${isStrict ? '<' : '\\le'}${a}$.`,
|
|
61
|
+
keys: ['S', 'equal', 'lbracket', 'semicolon', 'rbracket', 'emptyset'],
|
|
62
|
+
getPropositions,
|
|
63
|
+
answerFormat: 'tex',
|
|
64
|
+
};
|
|
65
|
+
return question;
|
|
66
|
+
}
|
|
67
|
+
exports.getAbsoluteValueInequationsQuestion = getAbsoluteValueInequationsQuestion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinatesReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/vectors/coordinatesReading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAe,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAMhH,eAAO,MAAM,kBAAkB,EAAE,YAWhC,CAAC;AAEF,wBAAgB,6BAA6B,IAAI,QAAQ,CAsExD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCoordinatesReadingQuestion = exports.coordinatesReading = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const integer_1 = require("../../../math/numbers/integer/integer");
|
|
7
|
+
const uuid_1 = require("uuid");
|
|
8
|
+
exports.coordinatesReading = {
|
|
9
|
+
id: 'coordinatesReading',
|
|
10
|
+
connector: '=',
|
|
11
|
+
instruction: '',
|
|
12
|
+
label: "Lire les coordonnées d'un vecteur",
|
|
13
|
+
levels: ['2nde', '1reESM'],
|
|
14
|
+
isSingleStep: true,
|
|
15
|
+
sections: ['Vecteurs'],
|
|
16
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCoordinatesReadingQuestion, nb),
|
|
17
|
+
qcmTimer: 60,
|
|
18
|
+
freeTimer: 60,
|
|
19
|
+
};
|
|
20
|
+
function getCoordinatesReadingQuestion() {
|
|
21
|
+
const [xA, yA] = integer_1.IntegerConstructor.randomDifferents(-5, 6, 2);
|
|
22
|
+
let xB, yB;
|
|
23
|
+
do {
|
|
24
|
+
[xB, yB] = integer_1.IntegerConstructor.randomDifferents(-5, 6, 2);
|
|
25
|
+
} while (xA === xB && yA === yB);
|
|
26
|
+
const xDelta = xB - xA;
|
|
27
|
+
const yDelta = yB - yA;
|
|
28
|
+
const answer = `\\left(${xDelta};${yDelta}\\right)`;
|
|
29
|
+
const commands = [`Vector((${xA},${yA}), (${xB}, ${yB}))`];
|
|
30
|
+
const xMin = Math.min(xA, xB);
|
|
31
|
+
const yMin = Math.min(yA, yB);
|
|
32
|
+
const xMax = Math.max(xA, xB);
|
|
33
|
+
const yMax = Math.max(yA, yB);
|
|
34
|
+
const coords = [
|
|
35
|
+
xMin === xMax ? xMin - 1 : xMin - 0.2 * Math.abs(xDelta),
|
|
36
|
+
xMin === xMax ? xMax + 1 : xMax + 0.2 * Math.abs(xDelta),
|
|
37
|
+
yMin === yMax ? yMin - 1 : yMin - 0.2 * Math.abs(yDelta),
|
|
38
|
+
yMin === yMax ? yMax + 1 : yMax + 0.2 * Math.abs(yDelta),
|
|
39
|
+
];
|
|
40
|
+
const getPropositions = (n) => {
|
|
41
|
+
const res = [];
|
|
42
|
+
res.push({
|
|
43
|
+
id: (0, uuid_1.v4)(),
|
|
44
|
+
statement: answer,
|
|
45
|
+
isRightAnswer: true,
|
|
46
|
+
format: 'tex',
|
|
47
|
+
});
|
|
48
|
+
(0, exercise_1.tryToAddWrongProp)(res, `\\left(${xA - xB};${yA - yB}\\right)`);
|
|
49
|
+
(0, exercise_1.tryToAddWrongProp)(res, `\\left(${xA + xB};${yA + yB}\\right)`);
|
|
50
|
+
(0, exercise_1.tryToAddWrongProp)(res, `\\left(${xA - yA};${xB - yB}\\right)`);
|
|
51
|
+
(0, exercise_1.tryToAddWrongProp)(res, `\\left(${yA - xA};${yB - xB}\\right)`);
|
|
52
|
+
const missing = n - res.length;
|
|
53
|
+
for (let i = 0; i < missing; i++) {
|
|
54
|
+
let isDuplicate;
|
|
55
|
+
let proposition;
|
|
56
|
+
do {
|
|
57
|
+
const wrongAnswer = '';
|
|
58
|
+
proposition = {
|
|
59
|
+
id: (0, uuid_1.v4)() + ``,
|
|
60
|
+
statement: wrongAnswer,
|
|
61
|
+
isRightAnswer: false,
|
|
62
|
+
format: 'tex',
|
|
63
|
+
};
|
|
64
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
65
|
+
} while (isDuplicate);
|
|
66
|
+
res.push(proposition);
|
|
67
|
+
}
|
|
68
|
+
return (0, exercise_1.shuffleProps)(res, n);
|
|
69
|
+
};
|
|
70
|
+
const question = {
|
|
71
|
+
answer: answer,
|
|
72
|
+
instruction: `Lire les coordonnées du vecteur $\\overrightarrow u$ représentée ci-dessous :`,
|
|
73
|
+
keys: ['semicolon', 'u', 'overrightarrow', 'equal'],
|
|
74
|
+
getPropositions,
|
|
75
|
+
answerFormat: 'tex',
|
|
76
|
+
commands,
|
|
77
|
+
coords,
|
|
78
|
+
};
|
|
79
|
+
return question;
|
|
80
|
+
}
|
|
81
|
+
exports.getCoordinatesReadingQuestion = getCoordinatesReadingQuestion;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MathExercise, Question } from '../../../exercises/exercise';
|
|
2
|
+
export declare const vectorCoordinatesFromTwoPoints: MathExercise;
|
|
3
|
+
export declare function getVectorCoordinatesFromTwoPointsQuestion(): Question;
|
|
4
|
+
//# sourceMappingURL=vectorCoordinatesFromTwoPoints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vectorCoordinatesFromTwoPoints.d.ts","sourceRoot":"","sources":["../../../../src/exercises/geometry/vectors/vectorCoordinatesFromTwoPoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAe,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAQhH,eAAO,MAAM,8BAA8B,EAAE,YAW5C,CAAC;AAEF,wBAAgB,yCAAyC,IAAI,QAAQ,CAuDpE"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getVectorCoordinatesFromTwoPointsQuestion = exports.vectorCoordinatesFromTwoPoints = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
7
|
+
const randomLetter_1 = require("../../../utils/randomLetter");
|
|
8
|
+
const uuid_1 = require("uuid");
|
|
9
|
+
exports.vectorCoordinatesFromTwoPoints = {
|
|
10
|
+
id: 'vectorCoordinatesFromTwoPoints',
|
|
11
|
+
connector: '=',
|
|
12
|
+
instruction: '',
|
|
13
|
+
label: "Déterminer les coordonnées d'un vecteur à partir de deux points",
|
|
14
|
+
levels: ['2nde'],
|
|
15
|
+
isSingleStep: true,
|
|
16
|
+
sections: ['Vecteurs'],
|
|
17
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getVectorCoordinatesFromTwoPointsQuestion, nb),
|
|
18
|
+
qcmTimer: 60,
|
|
19
|
+
freeTimer: 60,
|
|
20
|
+
};
|
|
21
|
+
function getVectorCoordinatesFromTwoPointsQuestion() {
|
|
22
|
+
const A = [(0, randint_1.randint)(-9, 9), (0, randint_1.randint)(-9, 9)];
|
|
23
|
+
const B = [(0, randint_1.randint)(-9, 9), (0, randint_1.randint)(-9, 9)];
|
|
24
|
+
const startLetter = (0, randomLetter_1.randomLetter)(true);
|
|
25
|
+
let endLetter = '';
|
|
26
|
+
do {
|
|
27
|
+
endLetter = (0, randomLetter_1.randomLetter)(true);
|
|
28
|
+
} while (endLetter === startLetter);
|
|
29
|
+
const answer = `\\left(${B[0] - A[0]};${B[1] - A[1]}\\right)`;
|
|
30
|
+
const getPropositions = (n) => {
|
|
31
|
+
const res = [];
|
|
32
|
+
res.push({
|
|
33
|
+
id: (0, uuid_1.v4)(),
|
|
34
|
+
statement: answer,
|
|
35
|
+
isRightAnswer: true,
|
|
36
|
+
format: 'tex',
|
|
37
|
+
});
|
|
38
|
+
(0, exercise_1.tryToAddWrongProp)(res, `\\left(${A[0] - B[0]};${A[1] - B[1]}\\right)`);
|
|
39
|
+
(0, exercise_1.tryToAddWrongProp)(res, `\\left(${A[1] - A[0]};${B[1] - B[0]}\\right)`);
|
|
40
|
+
(0, exercise_1.tryToAddWrongProp)(res, `\\left(${B[1] - B[0]};${A[1] - A[0]}\\right)`);
|
|
41
|
+
const missing = n - res.length;
|
|
42
|
+
for (let i = 0; i < missing; i++) {
|
|
43
|
+
let isDuplicate;
|
|
44
|
+
let proposition;
|
|
45
|
+
do {
|
|
46
|
+
const wrongAnswer = `\\left(${(0, randint_1.randint)(-10, 10)};${(0, randint_1.randint)(-10, 10)}\\right)`;
|
|
47
|
+
proposition = {
|
|
48
|
+
id: (0, uuid_1.v4)() + ``,
|
|
49
|
+
statement: wrongAnswer,
|
|
50
|
+
isRightAnswer: false,
|
|
51
|
+
format: 'tex',
|
|
52
|
+
};
|
|
53
|
+
isDuplicate = res.some((p) => p.statement === proposition.statement);
|
|
54
|
+
} while (isDuplicate);
|
|
55
|
+
res.push(proposition);
|
|
56
|
+
}
|
|
57
|
+
return (0, exercise_1.shuffleProps)(res, n);
|
|
58
|
+
};
|
|
59
|
+
const question = {
|
|
60
|
+
answer,
|
|
61
|
+
instruction: `Soit $${startLetter}\\left(${A[0]};${A[1]}\\right)$ et $${endLetter}\\left(${B[0]};${B[1]}\\right)$. Quelles sont les coordonnées du vecteur $\\overrightarrow{${startLetter}${endLetter}}$ ?`,
|
|
62
|
+
keys: ['semicolon'],
|
|
63
|
+
getPropositions,
|
|
64
|
+
answerFormat: 'tex',
|
|
65
|
+
};
|
|
66
|
+
return question;
|
|
67
|
+
}
|
|
68
|
+
exports.getVectorCoordinatesFromTwoPointsQuestion = getVectorCoordinatesFromTwoPointsQuestion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evolutionToCM.d.ts","sourceRoot":"","sources":["../../../src/exercises/percent/evolutionToCM.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,YAAY,EAAe,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAOhH,eAAO,MAAM,aAAa,EAAE,YAW3B,CAAC;AAEF,wBAAgB,wBAAwB,IAAI,QAAQ,CA2DnD"}
|