math-exercises 2.2.55 → 2.2.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/exercises/math/calcul/proportionality/index.d.ts +1 -0
- package/lib/exercises/math/calcul/proportionality/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/proportionality/index.js +1 -0
- package/lib/exercises/math/calcul/proportionality/isTableProportional.d.ts +8 -0
- package/lib/exercises/math/calcul/proportionality/isTableProportional.d.ts.map +1 -0
- package/lib/exercises/math/calcul/proportionality/isTableProportional.js +91 -0
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/equation/equationType4Exercise.js +0 -1
- package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts +11 -0
- package/lib/exercises/math/functions/trinoms/coefficientsIdentification.d.ts.map +1 -0
- package/lib/exercises/math/functions/trinoms/coefficientsIdentification.js +131 -0
- package/lib/exercises/math/functions/trinoms/index.d.ts +1 -0
- package/lib/exercises/math/functions/trinoms/index.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/index.js +1 -0
- package/lib/exercises/math/functions/trinoms/summitAbscissFromDevForm.d.ts.map +1 -1
- package/lib/exercises/math/functions/trinoms/summitAbscissFromDevForm.js +39 -1
- package/lib/exercises/math/geometry/areas/rightTriangleArea.js +2 -2
- package/lib/exercises/math/geometry/areas/triangleArea.js +2 -2
- package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.d.ts +7 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/buildTriangleWithSizes.js +117 -0
- package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/euclidianConstructions/index.js +2 -0
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts +10 -0
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.d.ts.map +1 -0
- package/lib/exercises/math/geometry/euclidianConstructions/pointImageFromTranslation.js +102 -0
- package/lib/exercises/math/geometry/pythagore/pythagore.d.ts +2 -0
- package/lib/exercises/math/geometry/pythagore/pythagore.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagore.js +4 -3
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts +2 -0
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/pythagore/pythagoreCalcul.js +4 -3
- package/lib/exercises/math/geometry/shapes/basicShapesNaming.d.ts.map +1 -1
- package/lib/exercises/math/geometry/shapes/basicShapesNaming.js +0 -1
- package/lib/exercises/math/geometry/thales/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/index.js +1 -0
- package/lib/exercises/math/geometry/thales/thales.d.ts +7 -0
- package/lib/exercises/math/geometry/thales/thales.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thales.js +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts +11 -5
- package/lib/exercises/math/geometry/thales/thalesCalcul.d.ts.map +1 -1
- package/lib/exercises/math/geometry/thales/thalesCalcul.js +166 -118
- package/lib/exercises/math/geometry/thales/thalesCalculOld.d.ts +1 -0
- package/lib/exercises/math/geometry/thales/thalesCalculOld.d.ts.map +1 -0
- package/lib/exercises/math/geometry/thales/thalesCalculOld.js +214 -0
- package/lib/exercises/math/percent/index.d.ts +0 -1
- package/lib/exercises/math/percent/index.d.ts.map +1 -1
- package/lib/exercises/math/percent/index.js +0 -1
- package/lib/exercises/math/probaStat/binomial/binomialInequation.d.ts +16 -0
- package/lib/exercises/math/probaStat/binomial/binomialInequation.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/binomialInequation.js +159 -0
- package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.d.ts +13 -0
- package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/calculateProbaOfBinomialDistribution.js +106 -0
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/expectedValueOfBinomialProba.js +89 -0
- package/lib/exercises/math/probaStat/binomial/index.d.ts +5 -0
- package/lib/exercises/math/probaStat/binomial/index.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/index.js +20 -0
- package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.d.ts +9 -0
- package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.d.ts.map +1 -0
- package/lib/exercises/math/probaStat/binomial/varianceOfBinomialProba.js +94 -0
- package/lib/exercises/math/probaStat/cardBasicProbas.d.ts +3 -0
- package/lib/exercises/math/probaStat/cardBasicProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/cardBasicProbas.js +3 -2
- package/lib/exercises/math/probaStat/diceBasicProbas.d.ts +1 -0
- package/lib/exercises/math/probaStat/diceBasicProbas.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/diceBasicProbas.js +8 -4
- package/lib/exercises/math/probaStat/index.d.ts +1 -3
- package/lib/exercises/math/probaStat/index.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/index.js +1 -3
- package/lib/exercises/math/probaStat/issuesCountingForCards.d.ts +2 -0
- package/lib/exercises/math/probaStat/issuesCountingForCards.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/issuesCountingForCards.js +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts +4 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/probaFromTableNoContext.js +17 -5
- package/lib/exercises/math/probaStat/stats1var/marginalAndConditionalFrequency.js +0 -1
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts +2 -0
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.d.ts.map +1 -1
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +4 -1
- package/lib/exercises/math/trigonometry/associatePoint.d.ts +3 -0
- package/lib/exercises/math/trigonometry/associatePoint.d.ts.map +1 -1
- package/lib/exercises/math/trigonometry/associatePoint.js +5 -1
- package/lib/exercises/math/trigonometry/trigonometry.js +2 -2
- package/lib/exercises/math/trigonometry/trigonometryAngleCalcul.js +2 -2
- package/lib/exercises/math/trigonometry/trigonometrySideCalcul.js +2 -2
- package/lib/exercises/pc/calibrationCurveOfSolution.d.ts +1 -0
- package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.js +2 -0
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts +6 -1
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalReactions/stoichiometricReaction.js +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts +4 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.d.ts.map +1 -1
- package/lib/exercises/pc/electricity/ohmicConductorOrGenerator.js +2 -1
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts +2 -0
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.d.ts.map +1 -1
- package/lib/exercises/pc/identifyAtomicMassOrAtomicNb.js +2 -0
- package/lib/exercises/pc/mole/molarMass.js +1 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts +4 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.d.ts.map +1 -1
- package/lib/exercises/pc/motion/typeOfAcceleration.js +5 -1
- package/lib/exercises/pc/motion/typeOfMovement.d.ts +4 -1
- package/lib/exercises/pc/motion/typeOfMovement.d.ts.map +1 -1
- package/lib/exercises/pc/motion/typeOfMovement.js +1 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts +3 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.d.ts.map +1 -1
- package/lib/exercises/pc/recognizeRefractionOrReflectionAngles.js +1 -1
- package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts +3 -0
- package/lib/exercises/utils/geogebra/toGGBCommandsProps.d.ts.map +1 -1
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts +4 -0
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts.map +1 -1
- package/lib/exercises/utils/geogebra/toolBarConstructor.js +8 -0
- package/lib/exercises/utils/getDistinctQuestions.d.ts.map +1 -1
- package/lib/exercises/utils/getDistinctQuestions.js +11 -4
- package/lib/index.d.ts +94 -26
- package/lib/index.d.ts.map +1 -1
- package/lib/math/geometry/CloudPoints.d.ts +5 -1
- package/lib/math/geometry/CloudPoints.d.ts.map +1 -1
- package/lib/math/geometry/CloudPoints.js +5 -0
- package/lib/math/geometry/line.d.ts +23 -1
- package/lib/math/geometry/line.d.ts.map +1 -1
- package/lib/math/geometry/line.js +53 -2
- package/lib/math/geometry/point.d.ts +15 -13
- package/lib/math/geometry/point.d.ts.map +1 -1
- package/lib/math/geometry/point.js +28 -12
- package/lib/math/geometry/segment.d.ts +11 -1
- package/lib/math/geometry/segment.d.ts.map +1 -1
- package/lib/math/geometry/segment.js +12 -0
- package/lib/math/geometry/triangle.d.ts +67 -0
- package/lib/math/geometry/triangle.d.ts.map +1 -0
- package/lib/math/geometry/triangle.js +227 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +0 -2
- package/lib/math/numbers/rationals/rational.d.ts +1 -0
- package/lib/math/numbers/rationals/rational.d.ts.map +1 -1
- package/lib/math/numbers/rationals/rational.js +5 -0
- package/lib/math/polynomials/generalTrinom.d.ts +2 -2
- package/lib/math/polynomials/generalTrinom.d.ts.map +1 -1
- package/lib/math/probability/binomial.d.ts +10 -0
- package/lib/math/probability/binomial.d.ts.map +1 -0
- package/lib/math/probability/binomial.js +30 -0
- package/lib/math/sets/intervals/intervals.d.ts +1 -1
- package/lib/math/systems/generalSystem.d.ts +11 -0
- package/lib/math/systems/generalSystem.d.ts.map +1 -0
- package/lib/math/systems/generalSystem.js +79 -0
- package/lib/playground.d.ts.map +1 -1
- package/lib/playground.js +1 -4
- package/lib/server.js +0 -2
- package/lib/tree/nodes/geometry/pointNode.d.ts +1 -10
- package/lib/tree/nodes/geometry/pointNode.d.ts.map +1 -1
- package/lib/tree/nodes/inequations/inequationNode.js +1 -1
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts +2 -11
- package/lib/tree/nodes/inequations/inequationSolutionNode.d.ts.map +1 -1
- package/lib/tree/nodes/node.d.ts +2 -1
- package/lib/tree/nodes/node.d.ts.map +1 -1
- package/lib/tree/nodes/node.js +1 -0
- package/lib/tree/nodes/nodeConstructor.d.ts +4 -3
- package/lib/tree/nodes/nodeConstructor.d.ts.map +1 -1
- package/lib/tree/nodes/nodeConstructor.js +4 -0
- package/lib/tree/nodes/operators/addNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/addNode.js +20 -8
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts +35 -0
- package/lib/tree/nodes/operators/binomialCoefficientNode.d.ts.map +1 -0
- package/lib/tree/nodes/operators/binomialCoefficientNode.js +52 -0
- package/lib/tree/nodes/operators/fractionNode.d.ts +1 -1
- package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/fractionNode.js +2 -4
- package/lib/tree/nodes/operators/operatorNode.d.ts +2 -1
- package/lib/tree/nodes/operators/operatorNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/operatorNode.js +1 -0
- package/lib/tree/nodes/sets/intervalNode.d.ts +9 -10
- package/lib/tree/nodes/sets/intervalNode.d.ts.map +1 -1
- package/lib/tree/nodes/sets/intervalNode.js +1 -0
- package/lib/utils/alea/random.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./calculateProbaOfBinomialDistribution"), exports);
|
|
18
|
+
__exportStar(require("./expectedValueOfBinomialProba"), exports);
|
|
19
|
+
__exportStar(require("./varianceOfBinomialProba"), exports);
|
|
20
|
+
__exportStar(require("./binomialInequation"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
nX: number;
|
|
4
|
+
a: number;
|
|
5
|
+
b: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const varianceOfBinomialProba: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=varianceOfBinomialProba.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"varianceOfBinomialProba.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/binomial/varianceOfBinomialProba.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAalC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA+FF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAczD,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.varianceOfBinomialProba = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const rational_1 = require("../../../../math/numbers/rationals/rational");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
9
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
11
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
12
|
+
const alignTex_1 = require("../../../../utils/latex/alignTex");
|
|
13
|
+
const nbOneNode = new numberNode_1.NumberNode(1);
|
|
14
|
+
const getVarianceOfBinomialProbaQuestion = () => {
|
|
15
|
+
const nX = (0, randint_1.randint)(1, 9);
|
|
16
|
+
const b = (0, randint_1.randint)(2, 11);
|
|
17
|
+
const a = (0, randint_1.randint)(1, b);
|
|
18
|
+
const p = new rational_1.Rational(a, b);
|
|
19
|
+
const correctAns = getCorrectAnswer(nX, p);
|
|
20
|
+
const answer = correctAns.toTex();
|
|
21
|
+
const question = {
|
|
22
|
+
answer,
|
|
23
|
+
instruction: `Soit $X$ une variable aléatoire qui suit une loi binomiale de paramètres $n=${nX}$ et $p=${p
|
|
24
|
+
.toTree()
|
|
25
|
+
.simplify()
|
|
26
|
+
.toTex()}$. Calculez la variance de $X$.`,
|
|
27
|
+
keys: [],
|
|
28
|
+
answerFormat: "tex",
|
|
29
|
+
identifiers: { nX, a, b },
|
|
30
|
+
hint: `L'espérance d'une variable aléatoire $X$ qui suit une loi binomiale de paramètres $n$ et $p$ est donnée par :
|
|
31
|
+
|
|
32
|
+
$V(X) = np(1-p)$.`,
|
|
33
|
+
correction: `L'espérance d'une variable aléatoire $X$ qui suit une loi binomiale de paramètres $n$ et $p$ est donnée par :
|
|
34
|
+
|
|
35
|
+
$V(X) = np(1-p)$.
|
|
36
|
+
|
|
37
|
+
Ici, on a donc :
|
|
38
|
+
|
|
39
|
+
${(0, alignTex_1.alignTex)([
|
|
40
|
+
[
|
|
41
|
+
"V(X)",
|
|
42
|
+
"=",
|
|
43
|
+
new multiplyNode_1.MultiplyNode(nX.toTree(), new multiplyNode_1.MultiplyNode(p.toTree(), new substractNode_1.SubstractNode((1).toTree(), p.toTree())), { forceTimesSign: true }).toTex(),
|
|
44
|
+
],
|
|
45
|
+
["", "=", answer],
|
|
46
|
+
])}`,
|
|
47
|
+
};
|
|
48
|
+
return question;
|
|
49
|
+
};
|
|
50
|
+
const getPropositions = (n, { answer, nX, a, b }) => {
|
|
51
|
+
const propositions = [];
|
|
52
|
+
const p = new rational_1.Rational(a, b);
|
|
53
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
54
|
+
generatePropositions(nX, p).forEach((value) => (0, exercise_1.tryToAddWrongProp)(propositions, value));
|
|
55
|
+
let random;
|
|
56
|
+
while (propositions.length < n) {
|
|
57
|
+
random = rational_1.RationalConstructor.randomIrreductible(10).toTree();
|
|
58
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, random.toTex());
|
|
59
|
+
}
|
|
60
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
61
|
+
};
|
|
62
|
+
const isAnswerValid = (ans, { nX, a, b }) => {
|
|
63
|
+
const p = new rational_1.Rational(a, b);
|
|
64
|
+
const correctAns = getCorrectAnswer(nX, p);
|
|
65
|
+
return correctAns
|
|
66
|
+
.toAllValidTexs({ allowFractionToDecimal: true })
|
|
67
|
+
.includes(ans);
|
|
68
|
+
};
|
|
69
|
+
const generatePropositions = (n, p) => {
|
|
70
|
+
const pTree = p.toTree().simplify();
|
|
71
|
+
const nNode = new numberNode_1.NumberNode(n);
|
|
72
|
+
const firstProposition = new multiplyNode_1.MultiplyNode(nNode, pTree).simplify();
|
|
73
|
+
const secondProposition = new multiplyNode_1.MultiplyNode(nNode, new powerNode_1.PowerNode(pTree, new numberNode_1.NumberNode(2)).simplify()).simplify();
|
|
74
|
+
return [firstProposition.toTex(), secondProposition.toTex()];
|
|
75
|
+
};
|
|
76
|
+
const getCorrectAnswer = (n, p) => {
|
|
77
|
+
const pTree = p.toTree().simplify();
|
|
78
|
+
const oneMinusP = new substractNode_1.SubstractNode(nbOneNode, pTree);
|
|
79
|
+
return new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(n), new multiplyNode_1.MultiplyNode(pTree, oneMinusP).simplify()).simplify();
|
|
80
|
+
};
|
|
81
|
+
exports.varianceOfBinomialProba = {
|
|
82
|
+
id: "varianceOfBinomialProba",
|
|
83
|
+
label: "Calcul de la variance d'une loi binomiale",
|
|
84
|
+
levels: ["TermTech"],
|
|
85
|
+
isSingleStep: true,
|
|
86
|
+
sections: ["Probabilités"],
|
|
87
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getVarianceOfBinomialProbaQuestion, nb),
|
|
88
|
+
qcmTimer: 60,
|
|
89
|
+
freeTimer: 60,
|
|
90
|
+
getPropositions,
|
|
91
|
+
isAnswerValid,
|
|
92
|
+
subject: "Mathématiques",
|
|
93
|
+
hasHintAndCorrection: true,
|
|
94
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
import { CardsColor } from "../../../exercises/utils/cardsData";
|
|
2
3
|
type Identifiers = {
|
|
3
4
|
questionType: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
color?: CardsColor;
|
|
4
7
|
};
|
|
5
8
|
export declare const cardBasicProbas: Exercise<Identifiers>;
|
|
6
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/cardBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"cardBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/cardBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,UAAU,EAAe,MAAM,iCAAiC,CAAC;AAE1E,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,UAAU,CAAC;CACpB,CAAC;AA6FF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
|
|
@@ -18,7 +18,7 @@ const getCardBasicProbasQuestion = () => {
|
|
|
18
18
|
]);
|
|
19
19
|
let answer = "";
|
|
20
20
|
let target = "";
|
|
21
|
-
let value;
|
|
21
|
+
let value = "";
|
|
22
22
|
let color;
|
|
23
23
|
switch (questionType) {
|
|
24
24
|
case "oneCard":
|
|
@@ -33,6 +33,7 @@ const getCardBasicProbasQuestion = () => {
|
|
|
33
33
|
answer = "\\frac{1}{13}";
|
|
34
34
|
break;
|
|
35
35
|
case "colorCard":
|
|
36
|
+
default:
|
|
36
37
|
color = (0, randomEnumValue_1.randomEnumValue)(cardsData_1.CardsColor);
|
|
37
38
|
target = `un ${color}`;
|
|
38
39
|
answer = `\\frac{1}{4}`;
|
|
@@ -43,7 +44,7 @@ const getCardBasicProbasQuestion = () => {
|
|
|
43
44
|
instruction: `On tire une carte dans un jeu de 52 cartes. Quelle est la probabilité d'obtenir ${target} ?`,
|
|
44
45
|
keys: [],
|
|
45
46
|
answerFormat: "tex",
|
|
46
|
-
identifiers: { questionType },
|
|
47
|
+
identifiers: { questionType, value, color: color },
|
|
47
48
|
};
|
|
48
49
|
return question;
|
|
49
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diceBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/diceBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"diceBasicProbas.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/diceBasicProbas.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAiFF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,WAAW,CAcjD,CAAC"}
|
|
@@ -19,15 +19,19 @@ const getDiceBasicProbasQuestion = () => {
|
|
|
19
19
|
: `la face ${faceAsked}`;
|
|
20
20
|
const answer = isParityQuestion
|
|
21
21
|
? isEvenQuestion
|
|
22
|
-
?
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
? (0, fractionNode_1.frac)(Math.floor(nbFaces / 2), nbFaces)
|
|
23
|
+
.simplify()
|
|
24
|
+
.toTex()
|
|
25
|
+
: (0, fractionNode_1.frac)(Math.ceil(nbFaces / 2), nbFaces)
|
|
26
|
+
.simplify()
|
|
27
|
+
.toTex()
|
|
28
|
+
: (0, fractionNode_1.frac)(1, nbFaces).toTex();
|
|
25
29
|
const question = {
|
|
26
30
|
answer,
|
|
27
31
|
instruction: `On lance un dé équilibré à ${nbFaces} faces. Quelle est la probabilité d'obtenir ${target} ?`,
|
|
28
32
|
keys: [],
|
|
29
33
|
answerFormat: "tex",
|
|
30
|
-
identifiers: { isParityQuestion, isEvenQuestion, nbFaces },
|
|
34
|
+
identifiers: { isParityQuestion, isEvenQuestion, nbFaces, faceAsked },
|
|
31
35
|
};
|
|
32
36
|
return question;
|
|
33
37
|
};
|
|
@@ -9,7 +9,5 @@ export * from "./independancy";
|
|
|
9
9
|
export * from "./issuesCountingForCards";
|
|
10
10
|
export * from "./probaFromTableNoContext";
|
|
11
11
|
export * from "./probaFromTableWithContext";
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./varianceOfBinomialProba";
|
|
14
|
-
export * from "./calculateProbaOfBinomialDistribution";
|
|
12
|
+
export * from "./binomial";
|
|
15
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,YAAY,CAAC"}
|
|
@@ -25,6 +25,4 @@ __exportStar(require("./independancy"), exports);
|
|
|
25
25
|
__exportStar(require("./issuesCountingForCards"), exports);
|
|
26
26
|
__exportStar(require("./probaFromTableNoContext"), exports);
|
|
27
27
|
__exportStar(require("./probaFromTableWithContext"), exports);
|
|
28
|
-
__exportStar(require("./
|
|
29
|
-
__exportStar(require("./varianceOfBinomialProba"), exports);
|
|
30
|
-
__exportStar(require("./calculateProbaOfBinomialDistribution"), exports);
|
|
28
|
+
__exportStar(require("./binomial"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"issuesCountingForCards.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/issuesCountingForCards.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"issuesCountingForCards.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/issuesCountingForCards.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAiEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -47,7 +47,7 @@ const getIssuesCountingForCardsQuestion = () => {
|
|
|
47
47
|
instruction: `On tire une carte dans un jeu de 52 cartes. Combien l'événement $A = $ "obtenir ${target}" compte-t-il d'issues ?`,
|
|
48
48
|
keys: [],
|
|
49
49
|
answerFormat: "tex",
|
|
50
|
-
identifiers: { questionType },
|
|
50
|
+
identifiers: { questionType, value, color },
|
|
51
51
|
};
|
|
52
52
|
return question;
|
|
53
53
|
};
|
|
@@ -8,6 +8,9 @@ type Identifiers = {
|
|
|
8
8
|
type: string;
|
|
9
9
|
probaFrac: number[];
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type Options = {
|
|
12
|
+
allowNonIrreductible?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const probaFromTableNoContext: Exercise<Identifiers, Options>;
|
|
12
15
|
export {};
|
|
13
16
|
//# sourceMappingURL=probaFromTableNoContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probaFromTableNoContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableNoContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"probaFromTableNoContext.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/probaStat/probaFromTableNoContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAWT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAgIF,KAAK,OAAO,GAAG;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC,CAAC;AAsBF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAiBlE,CAAC"}
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.probaFromTableNoContext = void 0;
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const allowNonIrreductibleFractions_1 = require("../../../exercises/options/allowNonIrreductibleFractions");
|
|
5
6
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
7
|
const rational_1 = require("../../../math/numbers/rationals/rational");
|
|
7
8
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
9
|
const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
|
|
10
|
+
const rationalParser_1 = require("../../../tree/parsers/rationalParser");
|
|
9
11
|
const random_1 = require("../../../utils/alea/random");
|
|
10
12
|
const dollarize_1 = require("../../../utils/latex/dollarize");
|
|
11
13
|
const mdTable_1 = require("../../../utils/markdown/mdTable");
|
|
@@ -111,11 +113,20 @@ const getPropositions = (n, { answer, aBarreCapB, aBarreCapBBarre, aCapB, aCapBB
|
|
|
111
113
|
}
|
|
112
114
|
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
113
115
|
};
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
.
|
|
118
|
-
|
|
116
|
+
const options = [allowNonIrreductibleFractions_1.allowNonIrreductibleOption];
|
|
117
|
+
const isAnswerValid = (ans, { answer, probaFrac }, options) => {
|
|
118
|
+
if (options?.allowNonIrreductible) {
|
|
119
|
+
const parsed = (0, rationalParser_1.rationalParser)(ans);
|
|
120
|
+
if (!parsed)
|
|
121
|
+
return false;
|
|
122
|
+
return parsed.simplify().toTex() === answer;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
const fracTexs = new fractionNode_1.FractionNode(probaFrac[0].toTree(), probaFrac[1].toTree())
|
|
126
|
+
.simplify()
|
|
127
|
+
.toAllValidTexs();
|
|
128
|
+
return fracTexs.includes(ans);
|
|
129
|
+
}
|
|
119
130
|
};
|
|
120
131
|
exports.probaFromTableNoContext = {
|
|
121
132
|
id: "probaFromTableNoContext",
|
|
@@ -131,4 +142,5 @@ exports.probaFromTableNoContext = {
|
|
|
131
142
|
isAnswerValid,
|
|
132
143
|
subject: "Mathématiques",
|
|
133
144
|
getInstruction,
|
|
145
|
+
options,
|
|
134
146
|
};
|
|
@@ -146,7 +146,6 @@ const getPropositions = (n, { answer, rand, x1, x2, x3, x4 }) => {
|
|
|
146
146
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
147
147
|
while (propositions.length < n) {
|
|
148
148
|
const fakeRand = (0, randint_1.randint)(0, 12);
|
|
149
|
-
// console.log("marg and cond freq", answer, rand, x1, x2, x3, x4);
|
|
150
149
|
const answerTree = getAnswerNode(fakeRand, x1, x2, x3, x4);
|
|
151
150
|
(0, exercise_1.tryToAddWrongProp)(propositions, answerTree.toTex());
|
|
152
151
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
import { CloudPointsIdentifiers } from "../../../../math/geometry/CloudPoints";
|
|
2
3
|
type Identifiers = {
|
|
3
4
|
isJustified: boolean;
|
|
5
|
+
cloudPointsIdentifiers: CloudPointsIdentifiers;
|
|
4
6
|
};
|
|
5
7
|
export declare const fineAdjustementExercise: Exercise<Identifiers>;
|
|
6
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fineAdjustementExercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats2var/fineAdjustementExercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fineAdjustementExercise.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats2var/fineAdjustementExercise.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAGL,sBAAsB,EACvB,MAAM,iCAAiC,CAAC;AAKzC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,CAAC;IACrB,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,CAAC;AAyHF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,WAAW,CAezD,CAAC"}
|
|
@@ -40,7 +40,10 @@ const getFineAdjustementExerciseQuestion = () => {
|
|
|
40
40
|
}),
|
|
41
41
|
keys: [],
|
|
42
42
|
answerFormat: "raw",
|
|
43
|
-
identifiers: {
|
|
43
|
+
identifiers: {
|
|
44
|
+
isJustified: exercise.isJustified,
|
|
45
|
+
cloudPointsIdentifiers: cloudPoints.toIdentifiers(),
|
|
46
|
+
},
|
|
44
47
|
};
|
|
45
48
|
return question;
|
|
46
49
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
import { NodeIdentifiers } from "../../../tree/nodes/nodeConstructor";
|
|
2
3
|
type Identifiers = {
|
|
3
4
|
angleValue: number;
|
|
5
|
+
angleIdentifiers: NodeIdentifiers;
|
|
6
|
+
point: string;
|
|
4
7
|
};
|
|
5
8
|
export declare const associatePoint: Exercise<Identifiers>;
|
|
6
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"associatePoint.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/associatePoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"associatePoint.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/trigonometry/associatePoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAInE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,eAAe,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAyDF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAchD,CAAC"}
|
|
@@ -33,7 +33,11 @@ const getAssociatePointQuestion = () => {
|
|
|
33
33
|
`,
|
|
34
34
|
keys: points,
|
|
35
35
|
answerFormat: "tex",
|
|
36
|
-
identifiers: {
|
|
36
|
+
identifiers: {
|
|
37
|
+
angleValue: remarkableValue.mainAngle.evaluate({}),
|
|
38
|
+
point: answer,
|
|
39
|
+
angleIdentifiers: remarkableValue.angle.toIdentifiers(),
|
|
40
|
+
},
|
|
37
41
|
};
|
|
38
42
|
return question;
|
|
39
43
|
};
|
|
@@ -4,7 +4,7 @@ exports.trigonometry = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
|
-
const
|
|
7
|
+
const triangle_1 = require("../../../math/geometry/triangle");
|
|
8
8
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
9
|
const lengthNode_1 = require("../../../tree/nodes/geometry/lengthNode");
|
|
10
10
|
const fractionNode_1 = require("../../../tree/nodes/operators/fractionNode");
|
|
@@ -14,7 +14,7 @@ const getTrigonometry = () => {
|
|
|
14
14
|
const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
15
15
|
for (let i = 0; i < 3; i++)
|
|
16
16
|
vertices.push(String.fromCharCode(code + i));
|
|
17
|
-
const triangle =
|
|
17
|
+
const triangle = triangle_1.TriangleConstructor.createRandomRightTriangle({
|
|
18
18
|
minRapport: 0.7,
|
|
19
19
|
maxRapport: 1.3,
|
|
20
20
|
names: vertices,
|
|
@@ -4,7 +4,7 @@ exports.trigonometryAngleCalcul = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
|
-
const
|
|
7
|
+
const triangle_1 = require("../../../math/geometry/triangle");
|
|
8
8
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
9
|
const round_1 = require("../../../math/utils/round");
|
|
10
10
|
const shuffle_1 = require("../../../utils/alea/shuffle");
|
|
@@ -13,7 +13,7 @@ const getTrigonometryAngleCalcul = () => {
|
|
|
13
13
|
const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
14
14
|
for (let i = 0; i < 3; i++)
|
|
15
15
|
vertices.push(String.fromCharCode(code + i));
|
|
16
|
-
const triangle =
|
|
16
|
+
const triangle = triangle_1.TriangleConstructor.createRandomRightTriangle({
|
|
17
17
|
minRapport: 0.5,
|
|
18
18
|
maxRapport: 1.5,
|
|
19
19
|
names: vertices,
|
|
@@ -4,7 +4,7 @@ exports.trigonometrySideCalcul = void 0;
|
|
|
4
4
|
const exercise_1 = require("../../../exercises/exercise");
|
|
5
5
|
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
6
|
const geogebraConstructor_1 = require("../../../geogebra/geogebraConstructor");
|
|
7
|
-
const
|
|
7
|
+
const triangle_1 = require("../../../math/geometry/triangle");
|
|
8
8
|
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
9
|
const round_1 = require("../../../math/utils/round");
|
|
10
10
|
const numberNode_1 = require("../../../tree/nodes/numbers/numberNode");
|
|
@@ -14,7 +14,7 @@ const getTrigonometrySideCalcul = () => {
|
|
|
14
14
|
const code = 65 + (0, randint_1.randint)(0, 24); // Générer un code de caractère majuscule aléatoire (A-Z)
|
|
15
15
|
for (let i = 0; i < 3; i++)
|
|
16
16
|
vertices.push(String.fromCharCode(code + i));
|
|
17
|
-
const triangle =
|
|
17
|
+
const triangle = triangle_1.TriangleConstructor.createRandomRightTriangle({
|
|
18
18
|
minRapport: 0.5,
|
|
19
19
|
maxRapport: 1.5,
|
|
20
20
|
names: vertices,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAYlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AA0FF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAc5D,CAAC"}
|
|
@@ -39,6 +39,7 @@ const getCalibrationCurveOfSolutionQuestion = () => {
|
|
|
39
39
|
identifiers: {
|
|
40
40
|
epsilon: exo.epsilon,
|
|
41
41
|
l: exo.l,
|
|
42
|
+
molecule: exo.molecule.formula,
|
|
42
43
|
},
|
|
43
44
|
};
|
|
44
45
|
return question;
|
|
@@ -66,6 +67,7 @@ const generateExercise = () => {
|
|
|
66
67
|
correction: getCorrection(),
|
|
67
68
|
epsilon,
|
|
68
69
|
l,
|
|
70
|
+
molecule,
|
|
69
71
|
};
|
|
70
72
|
};
|
|
71
73
|
const getCorrection = () => {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
-
type Identifiers = {
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
instruction: string;
|
|
4
|
+
answer: string;
|
|
5
|
+
nA: number;
|
|
6
|
+
nB: number;
|
|
7
|
+
};
|
|
3
8
|
export declare const stoichiometricReaction: Exercise<Identifiers>;
|
|
4
9
|
export {};
|
|
5
10
|
//# sourceMappingURL=stoichiometricReaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stoichiometricReaction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/stoichiometricReaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"stoichiometricReaction.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalReactions/stoichiometricReaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAyDF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
-
type Identifiers = {
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
ggbCommands: string[];
|
|
4
|
+
type: string;
|
|
5
|
+
};
|
|
3
6
|
export declare const ohmicConductorOrGenerator: Exercise<Identifiers>;
|
|
4
7
|
export {};
|
|
5
8
|
//# sourceMappingURL=ohmicConductorOrGenerator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ohmicConductorOrGenerator.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/electricity/ohmicConductorOrGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAmGF,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,WAAW,CAiB3D,CAAC"}
|
|
@@ -18,7 +18,7 @@ const getOhmicConductorOrGeneratorQuestion = () => {
|
|
|
18
18
|
hint: exo.hint,
|
|
19
19
|
correction: exo.correction,
|
|
20
20
|
answerFormat: "raw",
|
|
21
|
-
identifiers: {},
|
|
21
|
+
identifiers: { type: exo.type, ggbCommands: exo.ggb.commands },
|
|
22
22
|
};
|
|
23
23
|
return question;
|
|
24
24
|
};
|
|
@@ -47,6 +47,7 @@ const generateExercise = () => {
|
|
|
47
47
|
answer: type,
|
|
48
48
|
hint,
|
|
49
49
|
correction,
|
|
50
|
+
type,
|
|
50
51
|
};
|
|
51
52
|
};
|
|
52
53
|
const getGgb = (type) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifyAtomicMassOrAtomicNb.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/identifyAtomicMassOrAtomicNb.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"identifyAtomicMassOrAtomicNb.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/identifyAtomicMassOrAtomicNb.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA4EF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,CAAC,WAAW,CAa9D,CAAC"}
|
|
@@ -17,7 +17,7 @@ const getMolarMassQuestion = () => {
|
|
|
17
17
|
instruction: `Calculer la masse molaire ${article}${molecule.name.toLocaleLowerCase()} $${molecule.formula}$.`,
|
|
18
18
|
keys: [],
|
|
19
19
|
answerFormat: "tex",
|
|
20
|
-
identifiers: {},
|
|
20
|
+
identifiers: { molecule: molecule.formula },
|
|
21
21
|
};
|
|
22
22
|
return question;
|
|
23
23
|
};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
-
type Identifiers = {
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
typeOfAcceleration: string;
|
|
4
|
+
ggbCommands: string[];
|
|
5
|
+
};
|
|
3
6
|
export declare const typeOfAcceleration: Exercise<Identifiers>;
|
|
4
7
|
export {};
|
|
5
8
|
//# sourceMappingURL=typeOfAcceleration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"typeOfAcceleration.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/motion/typeOfAcceleration.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAwFF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAepD,CAAC"}
|
|
@@ -16,7 +16,10 @@ const getTypeOfAccelerationQuestion = () => {
|
|
|
16
16
|
}),
|
|
17
17
|
keys: [],
|
|
18
18
|
answerFormat: "raw",
|
|
19
|
-
identifiers: {
|
|
19
|
+
identifiers: {
|
|
20
|
+
typeOfAcceleration: exo.typeOfAcceleration,
|
|
21
|
+
ggbCommands: exo.ggb.object.commands,
|
|
22
|
+
},
|
|
20
23
|
};
|
|
21
24
|
return question;
|
|
22
25
|
};
|
|
@@ -46,6 +49,7 @@ const generateExo = () => {
|
|
|
46
49
|
instruction,
|
|
47
50
|
answer: typeOfAcceleration,
|
|
48
51
|
ggb,
|
|
52
|
+
typeOfAcceleration,
|
|
49
53
|
};
|
|
50
54
|
};
|
|
51
55
|
const generateGgb = (typeOfAcceleration) => {
|