math-exercises 3.0.33 → 3.0.35
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 +4 -0
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/exercise.js +9 -0
- package/lib/exercises/math/calcul/addAndSub.d.ts.map +1 -1
- package/lib/exercises/math/calcul/addAndSub.js +35 -17
- package/lib/exercises/math/calcul/arithmetics/divisorsList.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/divisorsList.js +1 -0
- package/lib/exercises/math/conversion/hoursToSecond.d.ts +9 -0
- package/lib/exercises/math/conversion/hoursToSecond.d.ts.map +1 -0
- package/lib/exercises/math/conversion/hoursToSecond.js +94 -0
- package/lib/exercises/math/conversion/index.d.ts +1 -0
- package/lib/exercises/math/conversion/index.d.ts.map +1 -1
- package/lib/exercises/math/conversion/index.js +1 -0
- package/lib/exercises/math/dataRepresentations/pieChartReading.d.ts.map +1 -1
- package/lib/exercises/math/dataRepresentations/pieChartReading.js +44 -9
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.js +41 -8
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeNumberReading.js +3 -1
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/derivativeTangentEquationReading.js +3 -1
- package/lib/exercises/math/derivation/tangent/tangentEquations.d.ts.map +1 -1
- package/lib/exercises/math/derivation/tangent/tangentEquations.js +96 -27
- package/lib/exercises/math/functions/affines/leadingCoefficientCalculV1.js +2 -2
- package/lib/exercises/math/functions/index.d.ts +1 -0
- package/lib/exercises/math/functions/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationByFactorisation.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/equation/solveSecondDegreeEquationFromCano.js +2 -2
- package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/factoForm/factorizedFormFromRoots.js +39 -16
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/niceRootsFromDevForm.js +35 -16
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromDevForm.js +31 -8
- package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/roots/rootsFromFactorizedForm.js +7 -5
- package/lib/exercises/math/functions/variations/index.d.ts +2 -0
- package/lib/exercises/math/functions/variations/index.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/index.js +1 -0
- package/lib/exercises/math/functions/variations/varTableExtremaReading.d.ts +11 -0
- package/lib/exercises/math/functions/variations/varTableExtremaReading.d.ts.map +1 -0
- package/lib/exercises/math/functions/variations/varTableExtremaReading.js +124 -0
- package/lib/exercises/math/percent/applyPercent.d.ts.map +1 -1
- package/lib/exercises/math/percent/applyPercent.js +8 -9
- package/lib/exercises/math/percent/averageEvolutionRate.d.ts.map +1 -1
- package/lib/exercises/math/percent/averageEvolutionRate.js +3 -3
- package/lib/exercises/math/percent/findStartValueAfterEvolution.d.ts.map +1 -1
- package/lib/exercises/math/percent/findStartValueAfterEvolution.js +4 -2
- package/lib/exercises/math/percent/percentWritings.js +1 -1
- package/lib/exercises/math/trigonometry/arcLength.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/basicEquationCos.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/basicEquationSin.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/basicEquationSin.js +1 -1
- package/lib/exercises/math/trigonometry/mainRemarkableValues.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/mainRemarkableValues.js +16 -7
- package/lib/geogebra/geogebraConstructor.d.ts +3 -0
- package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
- package/lib/geogebra/geogebraConstructor.js +9 -0
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValues.d.ts +2 -10
- package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValues.js +106 -104
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +2 -3
- package/lib/server.js +12 -0
- package/lib/tests/singleExo.test.d.ts.map +1 -1
- package/lib/tests/singleExo.test.js +3 -2
- package/lib/tree/nodes/numbers/percentNode.d.ts +1 -1
- package/lib/tree/nodes/numbers/percentNode.d.ts.map +1 -1
- package/lib/tree/nodes/numbers/percentNode.js +5 -4
- package/lib/tree/parsers/latexParser.d.ts.map +1 -1
- package/lib/tree/parsers/latexParser.js +11 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { KeyId } from "../types/keyIds.js";
|
|
2
2
|
import { KeyProps } from "../types/keyProps.js";
|
|
3
|
+
export declare const propWhile: (propositions: Proposition[], n: number, doStuff: () => void) => void;
|
|
3
4
|
export declare const addValidProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
|
|
4
5
|
export declare const addWrongProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
|
|
5
6
|
export declare const tryToAddWrongProp: (props: Proposition[], statement: string, format?: "tex" | "raw") => void;
|
|
@@ -60,6 +61,9 @@ export type GeogebraOptions = {
|
|
|
60
61
|
zAxis?: GeogebraAxisOptions;
|
|
61
62
|
viewDirectionVector?: number[];
|
|
62
63
|
fontSize?: number;
|
|
64
|
+
maxHeight?: number;
|
|
65
|
+
maxWidth?: number;
|
|
66
|
+
showFullScreenButton?: boolean;
|
|
63
67
|
};
|
|
64
68
|
export type KeyboardOptions = {
|
|
65
69
|
parenthesisShouldNotProduceLeftRight?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAInD,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,UAChB,WAAW,EAAE,KACjB,MAAM,sBACW,MAAM,kBAQ3B,CAAC;AAEF,oBAAY,qBAAqB;IAC/B,UAAU,eAAe;IACzB,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AACD,oBAAY,mBAAmB;IAC7B,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,WAAW,gBAAgB;CAC5B;AACD,MAAM,MAAM,eAAe,CAAC,MAAM,GAAG,GAAG,IAAI;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,qBAAqB,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG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GACb,aAAa,GACb,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,QAAQ,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"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { shuffle } from "../utils/alea/shuffle.js";
|
|
2
2
|
import { uuid } from "uuidv4";
|
|
3
|
+
export const propWhile = (propositions, n, doStuff) => {
|
|
4
|
+
let i = 0;
|
|
5
|
+
while (propositions.length < n) {
|
|
6
|
+
if (i > 1000)
|
|
7
|
+
throw new Error("Prop Loop infinite");
|
|
8
|
+
doStuff();
|
|
9
|
+
i++;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
3
12
|
export const addValidProp = (props, statement, format = "tex") => {
|
|
4
13
|
props.push({
|
|
5
14
|
id: uuid(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addAndSub.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/addAndSub.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"addAndSub.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/addAndSub.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAWT,MAAM,mBAAmB,CAAC;AAgD3B,KAAK,WAAW,GAAG;IAAE,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAkBzC,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAcnD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
2
|
+
import { numberVEA } from "../../../exercises/vea/numberVEA.js";
|
|
2
3
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
3
4
|
import { NumberNode } from "../../../tree/nodes/numbers/numberNode.js";
|
|
4
5
|
import { AddNode } from "../../../tree/nodes/operators/addNode.js";
|
|
@@ -7,26 +8,44 @@ import { addValidProp, tryToAddWrongProp, } from "../../exercise.js";
|
|
|
7
8
|
/**
|
|
8
9
|
* a±b±c±d
|
|
9
10
|
*/
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const numbers = [];
|
|
13
|
-
for (let i = 0; i < nbOperations + 1; i++) {
|
|
14
|
-
numbers.push(randint(-15, 15, [0]));
|
|
15
|
-
}
|
|
11
|
+
const getStatementNode = (identifiers) => {
|
|
12
|
+
const { numbers } = identifiers;
|
|
16
13
|
const allNumbersNodes = numbers.map((nb) => new NumberNode(nb));
|
|
17
14
|
let statementTree = new AddNode(allNumbersNodes[0], allNumbersNodes[1]);
|
|
18
15
|
for (let i = 2; i < allNumbersNodes.length; i++) {
|
|
19
16
|
statementTree = new AddNode(statementTree, allNumbersNodes[i]);
|
|
20
17
|
}
|
|
18
|
+
return statementTree;
|
|
19
|
+
};
|
|
20
|
+
const getStartStatement = (identifiers) => {
|
|
21
|
+
return getStatementNode(identifiers).toTex();
|
|
22
|
+
};
|
|
23
|
+
const getInstruction = (identifiers) => {
|
|
24
|
+
return `Calculer :
|
|
25
|
+
|
|
26
|
+
$$
|
|
27
|
+
${getStartStatement(identifiers)}
|
|
28
|
+
$$`;
|
|
29
|
+
};
|
|
30
|
+
const getAnswer = (identifiers) => {
|
|
31
|
+
const { numbers } = identifiers;
|
|
21
32
|
const answer = numbers.reduce((a, b) => a + b) + "";
|
|
22
|
-
|
|
33
|
+
return answer;
|
|
34
|
+
};
|
|
35
|
+
const getAddAndSubQuestions = () => {
|
|
36
|
+
const nbOperations = randint(2, 4);
|
|
37
|
+
const numbers = [];
|
|
38
|
+
for (let i = 0; i < nbOperations + 1; i++) {
|
|
39
|
+
numbers.push(randint(-15, 15, [0]));
|
|
40
|
+
}
|
|
41
|
+
const identifiers = { numbers };
|
|
23
42
|
const question = {
|
|
24
|
-
instruction:
|
|
25
|
-
startStatement:
|
|
26
|
-
answer,
|
|
43
|
+
instruction: getInstruction(identifiers),
|
|
44
|
+
startStatement: getStartStatement(identifiers),
|
|
45
|
+
answer: getAnswer(identifiers),
|
|
27
46
|
keys: [],
|
|
28
47
|
answerFormat: "tex",
|
|
29
|
-
identifiers
|
|
48
|
+
identifiers,
|
|
30
49
|
};
|
|
31
50
|
return question;
|
|
32
51
|
};
|
|
@@ -40,17 +59,13 @@ const getPropositions = (n, { answer }) => {
|
|
|
40
59
|
}
|
|
41
60
|
return shuffle(propositions);
|
|
42
61
|
};
|
|
43
|
-
const isAnswerValid = (
|
|
44
|
-
|
|
45
|
-
const texs = answerTree.toAllValidTexs();
|
|
46
|
-
return texs.includes(studentAns);
|
|
62
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
63
|
+
return numberVEA(ans, answer);
|
|
47
64
|
};
|
|
48
65
|
export const addAndSubExercise = {
|
|
49
66
|
id: "addAndSub",
|
|
50
67
|
connector: "=",
|
|
51
68
|
label: "Additions et soustractions de nombres entiers",
|
|
52
|
-
levels: ["6ème", "5ème"],
|
|
53
|
-
sections: ["Calculs"],
|
|
54
69
|
isSingleStep: true,
|
|
55
70
|
generator: (nb) => getDistinctQuestions(getAddAndSubQuestions, nb),
|
|
56
71
|
qcmTimer: 60,
|
|
@@ -58,4 +73,7 @@ export const addAndSubExercise = {
|
|
|
58
73
|
getPropositions,
|
|
59
74
|
isAnswerValid,
|
|
60
75
|
subject: "Mathématiques",
|
|
76
|
+
getInstruction,
|
|
77
|
+
getAnswer,
|
|
78
|
+
getStartStatement,
|
|
61
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;
|
|
1
|
+
{"version":3,"file":"divisorsList.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/arithmetics/divisorsList.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,6BAA6B,CAAC;AAOrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAiDF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,WAAW,CAc9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hoursToSecond.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/hoursToSecond.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAMrC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAyFF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAiB/C,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../exercises/exercise.js";
|
|
2
|
+
import { getDistinctQuestions } from "../../../exercises/utils/getDistinctQuestions.js";
|
|
3
|
+
import { numberVEA } from "../../../exercises/vea/numberVEA.js";
|
|
4
|
+
import { randint } from "../../../math/utils/random/randint.js";
|
|
5
|
+
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
6
|
+
const propositions = [];
|
|
7
|
+
const { hours, mins, seconds } = identifiers;
|
|
8
|
+
addValidProp(propositions, answer);
|
|
9
|
+
tryToAddWrongProp(propositions, hours * 60 + 60 * mins + seconds + "");
|
|
10
|
+
tryToAddWrongProp(propositions, seconds + "");
|
|
11
|
+
while (propositions.length < n) {
|
|
12
|
+
tryToAddWrongProp(propositions, randint(5000, 100000) + "");
|
|
13
|
+
}
|
|
14
|
+
return shuffleProps(propositions, n);
|
|
15
|
+
};
|
|
16
|
+
const getAnswer = (identifiers) => {
|
|
17
|
+
const { hours, mins, seconds } = identifiers;
|
|
18
|
+
return hours * 3600 + 60 * mins + seconds + "";
|
|
19
|
+
};
|
|
20
|
+
const getInstruction = (identifiers) => {
|
|
21
|
+
const { hours, mins, seconds } = identifiers;
|
|
22
|
+
return `Combien y a-t-il de secondes dans $${hours}\\text{h } ${mins} \\text{min } ${seconds}\\text{s }$ ?`;
|
|
23
|
+
};
|
|
24
|
+
const getHint = (identifiers) => {
|
|
25
|
+
return `Dans une minute, il y a $60$ secondes. Dans une heure, il y a $60$ minutes.`;
|
|
26
|
+
};
|
|
27
|
+
const getCorrection = (identifiers) => {
|
|
28
|
+
const { hours, mins, seconds } = identifiers;
|
|
29
|
+
return `Dans une minute, il y a $60$ secondes. Donc, le nombre de secondes dans $${mins}$ minutes est :
|
|
30
|
+
|
|
31
|
+
$$
|
|
32
|
+
60\\times ${mins} = ${60 * mins}
|
|
33
|
+
$$
|
|
34
|
+
|
|
35
|
+
Puis, dans une heure, il y a $60$ minutes, qui chacune compte $60$ secondes. Ainsi, dans une heure, il y a $60\\times 60 = 3600$ secondes.
|
|
36
|
+
|
|
37
|
+
Le nombre de secondes dans $${hours}$ heures est donc :
|
|
38
|
+
|
|
39
|
+
$$
|
|
40
|
+
3600\\times ${hours} = ${3600 * hours}
|
|
41
|
+
$$
|
|
42
|
+
|
|
43
|
+
Au final, dans $${hours}\\text{h } ${mins} \\text{min } ${seconds}\\text{s }$, il y a donc :
|
|
44
|
+
|
|
45
|
+
$$
|
|
46
|
+
${3600 * hours}+ ${60 * mins} + ${seconds} = ${getAnswer(identifiers)}
|
|
47
|
+
$$
|
|
48
|
+
|
|
49
|
+
secondes.
|
|
50
|
+
`;
|
|
51
|
+
};
|
|
52
|
+
const getKeys = (identifiers) => {
|
|
53
|
+
return [];
|
|
54
|
+
};
|
|
55
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
56
|
+
return numberVEA(ans, answer);
|
|
57
|
+
};
|
|
58
|
+
const getHoursToSecondQuestion = (ops) => {
|
|
59
|
+
const hours = randint(1, 24);
|
|
60
|
+
const mins = randint(1, 60);
|
|
61
|
+
const seconds = randint(1, 60);
|
|
62
|
+
const identifiers = {
|
|
63
|
+
hours,
|
|
64
|
+
mins,
|
|
65
|
+
seconds,
|
|
66
|
+
};
|
|
67
|
+
const question = {
|
|
68
|
+
answer: getAnswer(identifiers),
|
|
69
|
+
instruction: getInstruction(identifiers),
|
|
70
|
+
keys: getKeys(identifiers),
|
|
71
|
+
answerFormat: "tex",
|
|
72
|
+
identifiers,
|
|
73
|
+
hint: getHint(identifiers),
|
|
74
|
+
correction: getCorrection(identifiers),
|
|
75
|
+
};
|
|
76
|
+
return question;
|
|
77
|
+
};
|
|
78
|
+
export const hoursToSecond = {
|
|
79
|
+
id: "hoursToSecond",
|
|
80
|
+
connector: "=",
|
|
81
|
+
label: "Convertir une durée en 'h min s' en secondes",
|
|
82
|
+
isSingleStep: true,
|
|
83
|
+
generator: (nb, opts) => getDistinctQuestions(() => getHoursToSecondQuestion(opts), nb),
|
|
84
|
+
qcmTimer: 60,
|
|
85
|
+
freeTimer: 60,
|
|
86
|
+
getPropositions,
|
|
87
|
+
isAnswerValid,
|
|
88
|
+
subject: "Mathématiques",
|
|
89
|
+
getInstruction,
|
|
90
|
+
getHint,
|
|
91
|
+
getCorrection,
|
|
92
|
+
getAnswer,
|
|
93
|
+
hasHintAndCorrection: true,
|
|
94
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pieChartReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/pieChartReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"pieChartReading.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/dataRepresentations/pieChartReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAmBT,MAAM,6BAA6B,CAAC;AA0BrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AA+NF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAmBjD,CAAC"}
|
|
@@ -7,8 +7,10 @@ import { Point } from "../../../math/geometry/point.js";
|
|
|
7
7
|
import { randfloat } from "../../../math/utils/random/randfloat.js";
|
|
8
8
|
import { randint } from "../../../math/utils/random/randint.js";
|
|
9
9
|
import { round } from "../../../math/utils/round.js";
|
|
10
|
+
import { parseAlgebraic } from "../../../tree/parsers/latexParser.js";
|
|
10
11
|
import { percentParser } from "../../../tree/parsers/percentParser.js";
|
|
11
12
|
import { handleVEAError } from "../../../utils/errors/handleVEAError.js";
|
|
13
|
+
import { approxOrEqual } from "../../../utils/latex/approxOrEqual.js";
|
|
12
14
|
import { getLetter } from "../../../utils/strings/getLetter.js";
|
|
13
15
|
const getPropositions = (n, { answer, ...identifiers }) => {
|
|
14
16
|
const propositions = [];
|
|
@@ -37,10 +39,32 @@ const getInstruction = (identifiers) => {
|
|
|
37
39
|
|
|
38
40
|
Quelle proportion des communications effectuées, les communications audio représentent-elles ?
|
|
39
41
|
|
|
40
|
-
Arrondir au centième.`;
|
|
42
|
+
Arrondir au centième de pourcentage.`;
|
|
43
|
+
};
|
|
44
|
+
const getHint = (identifiers) => {
|
|
45
|
+
const { points } = identifiers;
|
|
46
|
+
const pointsObj = points.map((p, i) => new Point(getLetter(i, true), p[0], p[1]));
|
|
47
|
+
const angle = new Angle([pointsObj[1], new Point("O", 0, 0), pointsObj[0]]);
|
|
48
|
+
const angleValue = angle.evaluate();
|
|
49
|
+
return `Dans un diagramme circulaire, une proportion de $100\\%$ représente $360^{\\circ}$.
|
|
50
|
+
|
|
51
|
+
On utilise donc un produit en croix pour déterminer la proportion représentée par $${angleValue}^{\\circ}$.`;
|
|
52
|
+
};
|
|
53
|
+
const getCorrection = (identifiers) => {
|
|
54
|
+
const { points } = identifiers;
|
|
55
|
+
const pointsObj = points.map((p, i) => new Point(getLetter(i, true), p[0], p[1]));
|
|
56
|
+
const angle = new Angle([pointsObj[1], new Point("O", 0, 0), pointsObj[0]]);
|
|
57
|
+
const angleValue = angle.evaluate();
|
|
58
|
+
return `Dans un diagramme circulaire, une proportion de $100\\%$ représente $360^{\\circ}$.
|
|
59
|
+
|
|
60
|
+
On utilise donc un produit en croix pour déterminer la proportion représentée par $${angleValue}^{\\circ}$ :
|
|
61
|
+
|
|
62
|
+
$$
|
|
63
|
+
${angleValue} \\times \\frac{100}{360} ${approxOrEqual((angleValue * 100) / 360, 2).join("")}
|
|
64
|
+
$$
|
|
65
|
+
|
|
66
|
+
Les communications audio représentent donc $${getAnswer(identifiers)}$ des communications effectuées.`;
|
|
41
67
|
};
|
|
42
|
-
// const getHint: GetHint<Identifiers> = (identifiers) => {};
|
|
43
|
-
// const getCorrection: GetCorrection<Identifiers> = (identifiers) => {};
|
|
44
68
|
const getGGBOptions = (identifiers) => {
|
|
45
69
|
const { points, labels } = identifiers;
|
|
46
70
|
const pointsObj = points.map((p, i) => new Point(getLetter(i, true), p[0], p[1]));
|
|
@@ -100,8 +124,18 @@ const getKeys = (identifiers) => {
|
|
|
100
124
|
};
|
|
101
125
|
const isAnswerValid = (ans, { answer }) => {
|
|
102
126
|
try {
|
|
103
|
-
|
|
104
|
-
|
|
127
|
+
//!à factoriser
|
|
128
|
+
//!pb est que parseAlgebraic ne gère pas encore les %
|
|
129
|
+
let parsed;
|
|
130
|
+
if (ans.includes("%")) {
|
|
131
|
+
parsed = percentParser(ans);
|
|
132
|
+
return parsed === answer;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
parsed = parseAlgebraic(ans);
|
|
136
|
+
const nbAns = answer.replace("\\%", "").unfrenchify();
|
|
137
|
+
return Math.abs(parsed.evaluate() - nbAns / 100) < 0.0001;
|
|
138
|
+
}
|
|
105
139
|
}
|
|
106
140
|
catch (err) {
|
|
107
141
|
return handleVEAError(err);
|
|
@@ -147,8 +181,8 @@ const getQuestionFromIdentifiers = (identifiers) => {
|
|
|
147
181
|
keys: getKeys(identifiers),
|
|
148
182
|
answerFormat: "tex",
|
|
149
183
|
identifiers,
|
|
150
|
-
|
|
151
|
-
|
|
184
|
+
hint: getHint(identifiers),
|
|
185
|
+
correction: getCorrection(identifiers),
|
|
152
186
|
ggbOptions: getGGBOptions(identifiers),
|
|
153
187
|
};
|
|
154
188
|
return question;
|
|
@@ -163,8 +197,9 @@ export const pieChartReading = {
|
|
|
163
197
|
getPropositions,
|
|
164
198
|
isAnswerValid,
|
|
165
199
|
subject: "Mathématiques",
|
|
166
|
-
|
|
167
|
-
|
|
200
|
+
getHint,
|
|
201
|
+
getCorrection,
|
|
202
|
+
hasHintAndCorrection: true,
|
|
168
203
|
getInstruction,
|
|
169
204
|
getAnswer,
|
|
170
205
|
getGGBOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdDegreeFunctionVariation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"thirdDegreeFunctionVariation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/thirdDegreeFunctionVariation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,6BAA6B,CAAC;AAoBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IAEV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAwKF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAmB9D,CAAC"}
|
|
@@ -23,20 +23,48 @@ const rebuildIdentifiers = (oldIds) => {
|
|
|
23
23
|
};
|
|
24
24
|
const getInstruction = (identifiers) => {
|
|
25
25
|
const { a, coin, racine1, racine2 } = identifiers;
|
|
26
|
-
return
|
|
27
|
-
|
|
26
|
+
return `Soit $f$ la fonction représentée ci-dessous.
|
|
27
|
+
|
|
28
|
+
Sur quel(s) intervalle(s) la fonction dérivée $f'$ de $f$ est-elle ${coin < 0 ? "négative" : "positive"} ?`;
|
|
28
29
|
};
|
|
29
|
-
const
|
|
30
|
+
const getHint = (identifiers) => {
|
|
31
|
+
return `Si la fonction $f$ est croissante sur un intervalle, alors sa fonction dérivée $f'$ sera positive sur cet intervalle.
|
|
32
|
+
|
|
33
|
+
À l'inverse, si la fonction $f$ est décroissante sur un intervalle, alors sa fonction dérivée $f'$ sera négative sur cet intervalle.`;
|
|
34
|
+
};
|
|
35
|
+
const getCorrection = (identifiers) => {
|
|
36
|
+
const { a, coin, racine1, racine2 } = identifiers;
|
|
37
|
+
const variation = coin < 0 ? "décroissante" : "croissante";
|
|
38
|
+
const sign = coin < 0 ? "négative" : "positive";
|
|
39
|
+
const intervals = getIntervalsSolution(identifiers);
|
|
40
|
+
return `Si la fonction $f$ est ${variation} sur un intervalle, alors sa fonction dérivée $f'$ sera ${sign} sur cet intervalle.
|
|
41
|
+
|
|
42
|
+
Ici, on lit graphiquement que $f$ est ${variation} sur $${intervals[0].toTex()}$${intervals[1] ? ` et sur $${intervals[1].toTex()}$` : ""}.
|
|
43
|
+
|
|
44
|
+
On en déduit que $f'$ est donc ${sign} sur :
|
|
45
|
+
|
|
46
|
+
$$
|
|
47
|
+
${getAnswer(identifiers)}
|
|
48
|
+
$$`;
|
|
49
|
+
};
|
|
50
|
+
const getIntervalsSolution = (identifiers) => {
|
|
30
51
|
const { a, coin, racine1, racine2 } = identifiers;
|
|
31
52
|
const racine1Tree = new NumberNode(racine1);
|
|
32
53
|
const racine2Tree = new NumberNode(racine2);
|
|
33
|
-
const
|
|
34
|
-
? new IntervalNode(racine1Tree, racine2Tree, ClosureType.FF)
|
|
35
|
-
:
|
|
54
|
+
const intervals = coin * a < 0
|
|
55
|
+
? [new IntervalNode(racine1Tree, racine2Tree, ClosureType.FF)]
|
|
56
|
+
: [
|
|
36
57
|
new IntervalNode(MinusInfinityNode, racine1Tree, ClosureType.OF),
|
|
37
58
|
new IntervalNode(racine2Tree, PlusInfinityNode, ClosureType.FO),
|
|
38
|
-
]
|
|
39
|
-
return
|
|
59
|
+
];
|
|
60
|
+
return intervals;
|
|
61
|
+
};
|
|
62
|
+
const getAnswer = (identifiers) => {
|
|
63
|
+
const intervals = getIntervalsSolution(identifiers);
|
|
64
|
+
if (intervals.length === 1)
|
|
65
|
+
return intervals[0].toTex();
|
|
66
|
+
else
|
|
67
|
+
return new UnionIntervalNode(intervals).toTex();
|
|
40
68
|
};
|
|
41
69
|
const getGGBOptions = (identifiers) => {
|
|
42
70
|
const { a, coin, racine1, racine2, c } = identifiers;
|
|
@@ -81,6 +109,8 @@ const getThirdDegreeFunctionVariation = () => {
|
|
|
81
109
|
answerFormat: "tex",
|
|
82
110
|
ggbOptions: getGGBOptions(identifiers),
|
|
83
111
|
identifiers,
|
|
112
|
+
hint: getHint(identifiers),
|
|
113
|
+
correction: getCorrection(identifiers),
|
|
84
114
|
};
|
|
85
115
|
return question;
|
|
86
116
|
};
|
|
@@ -132,4 +162,7 @@ export const thirdDegreeFunctionVariation = {
|
|
|
132
162
|
getAnswer,
|
|
133
163
|
getGGBOptions,
|
|
134
164
|
rebuildIdentifiers,
|
|
165
|
+
hasHintAndCorrection: true,
|
|
166
|
+
getHint,
|
|
167
|
+
getCorrection,
|
|
135
168
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivativeNumberReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeNumberReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;
|
|
1
|
+
{"version":3,"file":"derivativeNumberReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeNumberReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,CAAC,EAAE,MAAM,EAAE,CAAC;IACZ,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAkJF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAmBzD,CAAC"}
|
|
@@ -36,7 +36,9 @@ const getInstruction = (identifiers) => {
|
|
|
36
36
|
const xB = B[0];
|
|
37
37
|
const yA = A[1];
|
|
38
38
|
const yB = B[1];
|
|
39
|
-
return `Ci-dessous sont tracées la courbe $\\mathcal C_f$ de la fonction $f$ et la tangente à cette courbe au point d'abscisse $${xA}
|
|
39
|
+
return `Ci-dessous sont tracées la courbe $\\mathcal C_f$ de la fonction $f$ et la tangente à cette courbe au point d'abscisse $${xA}$.
|
|
40
|
+
|
|
41
|
+
Déterminer $f'(${xA})$.`;
|
|
40
42
|
};
|
|
41
43
|
const getAnswer = (identifiers) => {
|
|
42
44
|
const { A, B } = identifiers;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAwBrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;
|
|
1
|
+
{"version":3,"file":"derivativeTangentEquationReading.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/derivativeTangentEquationReading.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAkBT,MAAM,6BAA6B,CAAC;AAwBrC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,GAAG,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAiQF,eAAO,MAAM,gCAAgC,EAAE,QAAQ,CAAC,WAAW,CAmBlE,CAAC;;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG"}
|
|
@@ -75,7 +75,9 @@ const getAnswer = ({ trinomCoeffs, xA, yA, yPrimeA, }) => {
|
|
|
75
75
|
return new EqualNode("y".toTree(), getAnswerTree({ xA, yA, yPrimeA, trinomCoeffs })).toTex();
|
|
76
76
|
};
|
|
77
77
|
const getInstruction = ({ xA }) => {
|
|
78
|
-
return `Ci-dessous sont tracées la courbe $\\mathcal C_f$ de la fonction $f$ et la tangente à cette courbe au point d'abscisse $${xA}
|
|
78
|
+
return `Ci-dessous sont tracées la courbe $\\mathcal C_f$ de la fonction $f$ et la tangente à cette courbe au point d'abscisse $${xA}$.
|
|
79
|
+
|
|
80
|
+
Déterminer l'équation de cette tangente.`;
|
|
79
81
|
};
|
|
80
82
|
const getHint = (identifiers) => {
|
|
81
83
|
return `L'équation de la tangente à la courbe de $f$ au point d'abscisse $a$ est :
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tangentEquations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/tangentEquations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"tangentEquations.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/tangent/tangentEquations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAmBrC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAmIF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|