math-exercises 2.1.26 → 2.2.0
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 +27 -4
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
- package/lib/exercises/math/calcul/digitDecimalRank.d.ts +8 -0
- package/lib/exercises/math/calcul/digitDecimalRank.d.ts.map +1 -0
- package/lib/exercises/math/calcul/digitDecimalRank.js +58 -0
- package/lib/exercises/math/calcul/digitRank.d.ts +8 -0
- package/lib/exercises/math/calcul/digitRank.d.ts.map +1 -0
- package/lib/exercises/math/calcul/digitRank.js +58 -0
- package/lib/exercises/math/calcul/index.d.ts +2 -0
- package/lib/exercises/math/calcul/index.d.ts.map +1 -1
- package/lib/exercises/math/calcul/index.js +2 -0
- package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
- package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
- package/lib/exercises/math/derivation/derivative/convexityTrinomials.js +1 -1
- package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +1 -1
- package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +1 -1
- package/lib/exercises/math/functions/affines/affineExpressionReading.js +1 -1
- package/lib/exercises/math/functions/parity/parityFromAlgebra.js +1 -1
- package/lib/exercises/math/functions/parity/parityFromGraph.js +1 -1
- package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +1 -1
- package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +1 -1
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.d.ts +8 -0
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +70 -0
- package/lib/exercises/math/geometry/cartesian/index.d.ts +2 -0
- package/lib/exercises/math/geometry/cartesian/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/cartesian/index.js +2 -0
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts +5 -0
- package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -0
- package/lib/exercises/math/geometry/cartesian/placeAPoint.js +46 -0
- package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
- package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +1 -1
- package/lib/exercises/math/geometry/vectors/colinearity.js +1 -1
- package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.d.ts +8 -0
- package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.d.ts.map +1 -0
- package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.js +71 -0
- package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +1 -1
- package/lib/exercises/math/geometry/vectors/index.d.ts +1 -0
- package/lib/exercises/math/geometry/vectors/index.d.ts.map +1 -1
- package/lib/exercises/math/geometry/vectors/index.js +1 -0
- package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +1 -1
- package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +1 -1
- package/lib/exercises/math/matrices/matrixGeneralTerm.js +1 -1
- package/lib/exercises/math/percent/isTableProportional.js +1 -1
- package/lib/exercises/math/probaStat/independancy.js +1 -1
- package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +1 -1
- package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +1 -1
- package/lib/exercises/math/sequences/genericSequenceVariations.js +1 -1
- package/lib/exercises/pc/calibrationCurveOfSolution.d.ts +8 -0
- package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -0
- package/lib/exercises/pc/calibrationCurveOfSolution.js +92 -0
- package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
- package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +1 -1
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
- package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts +12 -0
- package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -0
- package/lib/exercises/pc/dosage/beerLambertRandomValue.js +163 -0
- package/lib/exercises/pc/dosage/index.d.ts +2 -0
- package/lib/exercises/pc/dosage/index.d.ts.map +1 -0
- package/lib/exercises/pc/dosage/index.js +17 -0
- package/lib/exercises/pc/index.d.ts +3 -0
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +3 -0
- package/lib/exercises/pc/mole/concentrationReading.js +2 -2
- package/lib/exercises/pc/moleculeNomenclature.js +1 -1
- package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
- package/lib/exercises/pc/spectral/index.d.ts +2 -0
- package/lib/exercises/pc/spectral/index.d.ts.map +1 -0
- package/lib/exercises/pc/spectral/index.js +17 -0
- package/lib/exercises/pc/spectral/spectralEnergy.d.ts +10 -0
- package/lib/exercises/pc/spectral/spectralEnergy.d.ts.map +1 -0
- package/lib/exercises/pc/spectral/spectralEnergy.js +129 -0
- package/lib/exercises/utils/geogebra/getPointFromGGB.d.ts +3 -0
- package/lib/exercises/utils/geogebra/getPointFromGGB.d.ts.map +1 -0
- package/lib/exercises/utils/geogebra/getPointFromGGB.js +15 -0
- package/lib/exercises/utils/geogebra/getVectorFromGGB.d.ts +3 -0
- package/lib/exercises/utils/geogebra/getVectorFromGGB.d.ts.map +1 -0
- package/lib/exercises/utils/geogebra/getVectorFromGGB.js +11 -0
- package/lib/exercises/utils/geogebra/isGGBLine.d.ts +2 -0
- package/lib/exercises/utils/geogebra/isGGBLine.d.ts.map +1 -0
- package/lib/exercises/utils/geogebra/isGGBLine.js +8 -0
- package/lib/exercises/utils/geogebra/isGGBPoint.d.ts +2 -0
- package/lib/exercises/utils/geogebra/isGGBPoint.d.ts.map +1 -0
- package/lib/exercises/utils/geogebra/isGGBPoint.js +8 -0
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts +9 -0
- package/lib/exercises/utils/geogebra/toolBarConstructor.d.ts.map +1 -0
- package/lib/exercises/utils/geogebra/toolBarConstructor.js +20 -0
- package/lib/index.d.ts +26 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.d.ts +1 -0
- package/lib/math/numbers/decimals/decimal.d.ts.map +1 -1
- package/lib/math/numbers/decimals/decimal.js +2 -1
- package/lib/math/numbers/integer/integer.d.ts +1 -0
- package/lib/math/numbers/integer/integer.d.ts.map +1 -1
- package/lib/math/numbers/integer/integer.js +7 -1
- package/lib/pc/constants/quantic.d.ts +9 -0
- package/lib/pc/constants/quantic.d.ts.map +1 -0
- package/lib/pc/constants/quantic.js +14 -0
- package/lib/server.js +24 -10
- package/lib/utils/arrayEqual.d.ts.map +1 -1
- package/lib/utils/arrayHasSameElement.d.ts +2 -0
- package/lib/utils/arrayHasSameElement.d.ts.map +1 -0
- package/lib/utils/arrayHasSameElement.js +8 -0
- package/package.json +1 -1
|
@@ -15,8 +15,9 @@ export interface Question<TIdentifiers = {}> {
|
|
|
15
15
|
hint?: string;
|
|
16
16
|
correction?: string;
|
|
17
17
|
startStatement?: string;
|
|
18
|
-
answer
|
|
19
|
-
answerFormat
|
|
18
|
+
answer?: string;
|
|
19
|
+
answerFormat?: "tex" | "raw";
|
|
20
|
+
ggbAnswer?: string[];
|
|
20
21
|
keys?: KeyId[];
|
|
21
22
|
commands?: string[];
|
|
22
23
|
coords?: number[];
|
|
@@ -30,6 +31,22 @@ export interface Question<TIdentifiers = {}> {
|
|
|
30
31
|
isXAxesNatural?: boolean;
|
|
31
32
|
is3D?: boolean;
|
|
32
33
|
};
|
|
34
|
+
studentGgbOptions?: {
|
|
35
|
+
customToolBar?: string;
|
|
36
|
+
gridDistance?: [number, number];
|
|
37
|
+
hideGrid?: boolean;
|
|
38
|
+
hideAxes?: boolean;
|
|
39
|
+
isGridBold?: boolean;
|
|
40
|
+
isGridSimple?: boolean;
|
|
41
|
+
isAxesRatioFixed?: boolean;
|
|
42
|
+
isXAxesNatural?: boolean;
|
|
43
|
+
xAxisSteps?: number;
|
|
44
|
+
yAxisSteps?: number;
|
|
45
|
+
enableShiftDragZoom?: boolean;
|
|
46
|
+
coords?: number[];
|
|
47
|
+
initialCommands?: string[];
|
|
48
|
+
axisLabels?: string[];
|
|
49
|
+
};
|
|
33
50
|
style?: {
|
|
34
51
|
tableHasNoHeader?: boolean;
|
|
35
52
|
};
|
|
@@ -42,6 +59,9 @@ export type QCMGenerator<TIdentifiers> = (n: number, args: {
|
|
|
42
59
|
export type VEA<TIdentifiers> = (studentAnswer: string, args: {
|
|
43
60
|
answer: string;
|
|
44
61
|
} & TIdentifiers) => boolean;
|
|
62
|
+
export type GGBVEA<TIdentifiers> = (studentAnswer: string[], args: {
|
|
63
|
+
ggbAnswer: string[];
|
|
64
|
+
} & TIdentifiers) => boolean;
|
|
45
65
|
export type QuestionGenerator<TIdentifiers = {}, TOptions = {}> = (opts?: TOptions) => Question<TIdentifiers>;
|
|
46
66
|
export interface Exercise<TIdentifiers = {}> {
|
|
47
67
|
id: string;
|
|
@@ -52,17 +72,20 @@ export interface Exercise<TIdentifiers = {}> {
|
|
|
52
72
|
connector?: "=" | "\\iff" | "\\approx";
|
|
53
73
|
generator: (n: number) => Question<TIdentifiers>[];
|
|
54
74
|
maxAllowedQuestions?: number;
|
|
55
|
-
answerType?: "QCM" | "free" | "QCU";
|
|
75
|
+
answerType?: "GGB" | "QCM" | "free" | "QCU";
|
|
76
|
+
isQCM?: boolean;
|
|
56
77
|
qcmTimer: number;
|
|
57
78
|
freeTimer: number;
|
|
79
|
+
ggbTimer?: number;
|
|
58
80
|
getPropositions?: QCMGenerator<{
|
|
59
81
|
answer: string;
|
|
60
82
|
} & TIdentifiers>;
|
|
61
83
|
isAnswerValid?: VEA<TIdentifiers>;
|
|
84
|
+
isGGBAnswerValid?: GGBVEA<TIdentifiers>;
|
|
62
85
|
hasGeogebra?: boolean;
|
|
63
86
|
subject: "Mathématiques" | "Chimie" | "Physique";
|
|
64
87
|
}
|
|
65
88
|
export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
|
|
66
89
|
export type MathSection = "Aires" | "Arithmétique" | "Calcul littéral" | "Calculs" | "Combinatoire et dénombrement" | "Conversions" | "Dérivation" | "Droites" | "Ensembles et intervalles" | "Équations" | "Équations différentielles" | "Exponentielle" | "Fonction cube" | "Fonction inverse" | "Fonctions" | "Fonctions affines" | "Fonctions de référence" | "Fractions" | "Géométrie cartésienne" | "Géométrie euclidienne" | "Inéquations" | "Intégration" | "Limites" | "Logarithme népérien" | "Logarithme décimal" | "Matrices" | "Nombres complexes" | "Périmètres" | "Pourcentages" | "Primitives" | "Probabilités" | "Produit scalaire" | "Proportionnalité" | "Python" | "Puissances" | "Python" | "Racines carrées" | "Second degré" | "Statistiques" | "Suites" | "Systèmes" | "Théorème de Pythagore" | "Théorème de Thalès" | "Trigonométrie" | "Valeur absolue" | "Vecteurs";
|
|
67
|
-
export type PCSection = "Réaction chimique" | "Chimie des solutions" | "Forces" | "Chimie organique" | "Mécanique" | "Lumière" | "Acide / Base" | "Constitution et transformations de la matière" | "Ondes" | "Son" | "Corps purs et mélanges" | "Fluides" | "Mol" | "Électricité";
|
|
90
|
+
export type PCSection = "Réaction chimique" | "Chimie des solutions" | "Forces" | "Chimie organique" | "Mécanique" | "Lumière" | "Acide / Base" | "Constitution et transformations de la matière" | "Ondes" | "Son" | "Corps purs et mélanges" | "Fluides" | "Mol" | "Électricité" | "Spectrophotométrie" | "Quantique";
|
|
68
91
|
//# 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,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,iBAAiB,UACrB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAUtB,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,WAAW,EAAE,KAAK,MAAM,kBAE3D,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AACF,MAAM,WAAW,QAAQ,CAAC,YAAY,GAAG,EAAE;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,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,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SAQtB,CAAC;AACF,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAA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,GACR,SAAS,CAAC;AAEd,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,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,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,oBAAoB,GACpB,WAAW,CAAC"}
|
|
@@ -109,7 +109,7 @@ exports.paritySumsAndProducts = {
|
|
|
109
109
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getParitySumsAndProductsQuestion, nb, 12),
|
|
110
110
|
qcmTimer: 60,
|
|
111
111
|
freeTimer: 60,
|
|
112
|
-
answerType: "
|
|
112
|
+
answerType: "QCU",
|
|
113
113
|
maxAllowedQuestions: 12,
|
|
114
114
|
getPropositions,
|
|
115
115
|
subject: "Mathématiques",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digitDecimalRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitDecimalRank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA0CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.digitDecimalRank = void 0;
|
|
4
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const decimal_1 = require("../../../math/numbers/decimals/decimal");
|
|
7
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const getDigitDecimalRankQuestion = () => {
|
|
9
|
+
const decimalPartSize = (0, randint_1.randint)(2, 5);
|
|
10
|
+
const nb = decimal_1.DecimalConstructor.random(0, 1000, decimalPartSize);
|
|
11
|
+
const rankAsked = (0, randint_1.randint)(0, Math.min(decimalPartSize, 3));
|
|
12
|
+
const rankAskedLabel = decimal_1.decimalDigitRanks[rankAsked];
|
|
13
|
+
const decimalPartString = nb.decimalPart;
|
|
14
|
+
const answer = decimalPartString[rankAsked];
|
|
15
|
+
const question = {
|
|
16
|
+
answer,
|
|
17
|
+
instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${nb
|
|
18
|
+
.toTree()
|
|
19
|
+
.toTex()}$ ?`,
|
|
20
|
+
keys: [],
|
|
21
|
+
answerFormat: "tex",
|
|
22
|
+
identifiers: { nb: nb.tex, rankAsked },
|
|
23
|
+
};
|
|
24
|
+
return question;
|
|
25
|
+
};
|
|
26
|
+
const getPropositions = (n, { answer, nb }) => {
|
|
27
|
+
const propositions = [];
|
|
28
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
29
|
+
const decimal = new decimal_1.Decimal(Number(nb));
|
|
30
|
+
for (let i = 0; i < decimal.decimalPart.length; i++) {
|
|
31
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, decimal.decimalPart[i]);
|
|
32
|
+
}
|
|
33
|
+
while (propositions.length < n) {
|
|
34
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 10) + "");
|
|
35
|
+
}
|
|
36
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
37
|
+
};
|
|
38
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
39
|
+
return ans === answer;
|
|
40
|
+
};
|
|
41
|
+
const isGGBAnswerValid = (ans, { ggbAnswer }) => {
|
|
42
|
+
throw Error("GGBVea not implemented");
|
|
43
|
+
};
|
|
44
|
+
exports.digitDecimalRank = {
|
|
45
|
+
id: "digitDecimalRank",
|
|
46
|
+
connector: "=",
|
|
47
|
+
label: "",
|
|
48
|
+
levels: [],
|
|
49
|
+
isSingleStep: true,
|
|
50
|
+
sections: [],
|
|
51
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDigitDecimalRankQuestion, nb),
|
|
52
|
+
qcmTimer: 60,
|
|
53
|
+
freeTimer: 60,
|
|
54
|
+
getPropositions,
|
|
55
|
+
isAnswerValid,
|
|
56
|
+
isGGBAnswerValid,
|
|
57
|
+
subject: "Mathématiques",
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digitRank.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/digitRank.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA0CF,eAAO,MAAM,SAAS,EAAE,QAAQ,CAAC,WAAW,CAc3C,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.digitRank = 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 randint_1 = require("../../../math/utils/random/randint");
|
|
8
|
+
const getDigitRankQuestion = () => {
|
|
9
|
+
const size = (0, randint_1.randint)(3, 6);
|
|
10
|
+
const nb = integer_1.IntegerConstructor.random(size);
|
|
11
|
+
const rankAsked = (0, randint_1.randint)(0, Math.min(size, 4));
|
|
12
|
+
const rankAskedLabel = integer_1.integerDigitRanks[rankAsked];
|
|
13
|
+
const nbString = nb.toString();
|
|
14
|
+
const answer = nbString[nbString.length - rankAsked - 1];
|
|
15
|
+
const question = {
|
|
16
|
+
answer,
|
|
17
|
+
instruction: `Quel est le chiffre des ${rankAskedLabel} dans le nombre $${nb
|
|
18
|
+
.toTree()
|
|
19
|
+
.toTex()}$ ?`,
|
|
20
|
+
keys: [],
|
|
21
|
+
answerFormat: "tex",
|
|
22
|
+
identifiers: { nb, rankAsked },
|
|
23
|
+
};
|
|
24
|
+
return question;
|
|
25
|
+
};
|
|
26
|
+
const getPropositions = (n, { answer, nb }) => {
|
|
27
|
+
const propositions = [];
|
|
28
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
29
|
+
const nbString = nb.toString();
|
|
30
|
+
for (let i = 0; i < nbString.length; i++) {
|
|
31
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, nbString[i]);
|
|
32
|
+
}
|
|
33
|
+
while (propositions.length < n) {
|
|
34
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, (0, randint_1.randint)(0, 10) + "");
|
|
35
|
+
}
|
|
36
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
37
|
+
};
|
|
38
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
39
|
+
return ans === answer;
|
|
40
|
+
};
|
|
41
|
+
const isGGBAnswerValid = (ans, { ggbAnswer }) => {
|
|
42
|
+
throw Error("GGBVea not implemented");
|
|
43
|
+
};
|
|
44
|
+
exports.digitRank = {
|
|
45
|
+
id: "digitRank",
|
|
46
|
+
connector: "=",
|
|
47
|
+
label: "Déterminer le rang d'un chiffre dans un nombre entier",
|
|
48
|
+
levels: [],
|
|
49
|
+
isSingleStep: true,
|
|
50
|
+
sections: [],
|
|
51
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDigitRankQuestion, nb),
|
|
52
|
+
qcmTimer: 60,
|
|
53
|
+
freeTimer: 60,
|
|
54
|
+
getPropositions,
|
|
55
|
+
isAnswerValid,
|
|
56
|
+
isGGBAnswerValid,
|
|
57
|
+
subject: "Mathématiques",
|
|
58
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/calcul/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
|
|
@@ -22,3 +22,5 @@ __exportStar(require("./mentalCaluls"), exports);
|
|
|
22
22
|
__exportStar(require("./operations"), exports);
|
|
23
23
|
__exportStar(require("./proportionality"), exports);
|
|
24
24
|
__exportStar(require("./rounding"), exports);
|
|
25
|
+
__exportStar(require("./digitRank"), exports);
|
|
26
|
+
__exportStar(require("./digitDecimalRank"), exports);
|
|
@@ -69,7 +69,7 @@ exports.binomialsTrinomialsProposedSolutions = {
|
|
|
69
69
|
isSingleStep: true,
|
|
70
70
|
sections: ["Équations"],
|
|
71
71
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getBinomialsTrinomialsProposedSolutionsQuestion, nb),
|
|
72
|
-
answerType: "
|
|
72
|
+
answerType: "QCU",
|
|
73
73
|
qcmTimer: 60,
|
|
74
74
|
freeTimer: 60,
|
|
75
75
|
getPropositions,
|
|
@@ -89,7 +89,7 @@ exports.convexityQuadrinomials = {
|
|
|
89
89
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConvexityQuadrinomialsQuestion, nb),
|
|
90
90
|
qcmTimer: 60,
|
|
91
91
|
freeTimer: 60,
|
|
92
|
-
answerType: "
|
|
92
|
+
answerType: "QCU",
|
|
93
93
|
getPropositions,
|
|
94
94
|
isAnswerValid,
|
|
95
95
|
subject: "Mathématiques",
|
|
@@ -37,7 +37,7 @@ exports.convexityTrinomials = {
|
|
|
37
37
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConvexityTrinomialsQuestion, nb),
|
|
38
38
|
qcmTimer: 60,
|
|
39
39
|
freeTimer: 60,
|
|
40
|
-
answerType: "
|
|
40
|
+
answerType: "QCU",
|
|
41
41
|
getPropositions,
|
|
42
42
|
isAnswerValid,
|
|
43
43
|
subject: "Mathématiques",
|
|
@@ -116,7 +116,7 @@ exports.affineAdjustmentCompleteExercise = {
|
|
|
116
116
|
isSingleStep: true,
|
|
117
117
|
sections: ["Statistiques"],
|
|
118
118
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getAffineAdjustmentCompleteQuestion, nb),
|
|
119
|
-
answerType: "
|
|
119
|
+
answerType: "QCU",
|
|
120
120
|
qcmTimer: 60,
|
|
121
121
|
freeTimer: 60,
|
|
122
122
|
getPropositions,
|
|
@@ -25,7 +25,7 @@ const getAffineExpressionReadingQuestion = () => {
|
|
|
25
25
|
let yMin = Math.min(b, secondPoint[1]);
|
|
26
26
|
let yMax = Math.max(b, secondPoint[1]);
|
|
27
27
|
const commands = [
|
|
28
|
-
`l = Line(
|
|
28
|
+
`l = Line[(0, ${b}), (${secondPoint[0]}, ${secondPoint[1]})]`,
|
|
29
29
|
`SetColor(l, "${(0, colors_1.randomColor)()}")`,
|
|
30
30
|
"SetFixed(l, true)",
|
|
31
31
|
];
|
|
@@ -37,7 +37,7 @@ exports.extremumTypeFromAlgebricForm = {
|
|
|
37
37
|
isSingleStep: true,
|
|
38
38
|
sections: ["Second degré"],
|
|
39
39
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExtremumTypeFromAlgebricFormQuestion, nb),
|
|
40
|
-
answerType: "
|
|
40
|
+
answerType: "QCU",
|
|
41
41
|
qcmTimer: 60,
|
|
42
42
|
freeTimer: 60,
|
|
43
43
|
getPropositions,
|
|
@@ -37,7 +37,7 @@ exports.variationsFromAlgebricForm = {
|
|
|
37
37
|
isSingleStep: true,
|
|
38
38
|
sections: ["Second degré"],
|
|
39
39
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getVariationsFromAlgebricFormQuestion, nb),
|
|
40
|
-
answerType: "
|
|
40
|
+
answerType: "QCU",
|
|
41
41
|
qcmTimer: 60,
|
|
42
42
|
freeTimer: 60,
|
|
43
43
|
getPropositions,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawAlineInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/drawAlineInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAyDF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.drawAlineInGGB = void 0;
|
|
4
|
+
const isGGBLine_1 = require("../../../../exercises/utils/geogebra/isGGBLine");
|
|
5
|
+
const isGGBPoint_1 = require("../../../../exercises/utils/geogebra/isGGBPoint");
|
|
6
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
7
|
+
const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolBarConstructor");
|
|
8
|
+
const point_1 = require("../../../../math/geometry/point");
|
|
9
|
+
const affine_1 = require("../../../../math/polynomials/affine");
|
|
10
|
+
const arrayEqual_1 = require("../../../../utils/arrayEqual");
|
|
11
|
+
const getDrawAlineInGgbQuestion = () => {
|
|
12
|
+
const f = affine_1.AffineConstructor.random({ min: -3, max: 3 });
|
|
13
|
+
const yA = f.b;
|
|
14
|
+
const yB = f.a + f.b;
|
|
15
|
+
const yMax = Math.max(yA, yB, 0);
|
|
16
|
+
const yMin = Math.min(yA, yB, 0);
|
|
17
|
+
const question = {
|
|
18
|
+
ggbAnswer: [`(0,${yA})`, `(1,${yB})`, `Line[A, B]`],
|
|
19
|
+
instruction: `Tracer la droite $d$ d'équation $y=${f.toTex()}$.`,
|
|
20
|
+
keys: [],
|
|
21
|
+
answerFormat: "tex",
|
|
22
|
+
studentGgbOptions: {
|
|
23
|
+
customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
|
|
24
|
+
join: true,
|
|
25
|
+
}),
|
|
26
|
+
xAxisSteps: 1,
|
|
27
|
+
yAxisSteps: 1,
|
|
28
|
+
coords: [-6, 6, yMin - 5, yMax + 5],
|
|
29
|
+
isGridSimple: true,
|
|
30
|
+
},
|
|
31
|
+
identifiers: { correctA: f.a, correctB: f.b },
|
|
32
|
+
};
|
|
33
|
+
return question;
|
|
34
|
+
};
|
|
35
|
+
const isGGBAnswerValid = (ans, { ggbAnswer, correctA, correctB }) => {
|
|
36
|
+
const studentAnswer = ans.map((s) => s.split("=")[1]);
|
|
37
|
+
console.log(studentAnswer);
|
|
38
|
+
if ((0, arrayEqual_1.arrayEqual)(studentAnswer, ggbAnswer))
|
|
39
|
+
return true;
|
|
40
|
+
if (studentAnswer.length !== 3)
|
|
41
|
+
return false;
|
|
42
|
+
if (!(0, isGGBPoint_1.isGGBPoint)(studentAnswer[0]) ||
|
|
43
|
+
!(0, isGGBPoint_1.isGGBPoint)(studentAnswer[1]) ||
|
|
44
|
+
!(0, isGGBLine_1.isGGBLine)(studentAnswer[2]))
|
|
45
|
+
return false;
|
|
46
|
+
const A = getPoint(studentAnswer[0], "A");
|
|
47
|
+
const B = getPoint(studentAnswer[1], "B");
|
|
48
|
+
const a = (B.getYnumber() - A.getYnumber()) / (B.getXnumber() - A.getXnumber());
|
|
49
|
+
const b = A.getYnumber() - a * A.getXnumber();
|
|
50
|
+
return a === correctA && b === correctB;
|
|
51
|
+
};
|
|
52
|
+
const getPoint = (command, pointName) => {
|
|
53
|
+
const splitted = command.split(",");
|
|
54
|
+
const x = +splitted[0].replace("(", "");
|
|
55
|
+
const y = +splitted[1].replace(")", "");
|
|
56
|
+
return new point_1.Point(pointName, x.toTree(), y.toTree());
|
|
57
|
+
};
|
|
58
|
+
exports.drawAlineInGGB = {
|
|
59
|
+
id: "drawAlineInGGB",
|
|
60
|
+
label: "Tracer une droite à partir de son équation réduite",
|
|
61
|
+
levels: ["2nde"],
|
|
62
|
+
isSingleStep: true,
|
|
63
|
+
answerType: "GGB",
|
|
64
|
+
sections: ["Géométrie cartésienne"],
|
|
65
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getDrawAlineInGgbQuestion, nb),
|
|
66
|
+
qcmTimer: 60,
|
|
67
|
+
freeTimer: 60,
|
|
68
|
+
isGGBAnswerValid,
|
|
69
|
+
subject: "Mathématiques",
|
|
70
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
|
|
@@ -20,3 +20,5 @@ __exportStar(require("./cartesianEquationOfLine"), exports);
|
|
|
20
20
|
__exportStar(require("./pointCoordinates"), exports);
|
|
21
21
|
__exportStar(require("./directionVector"), exports);
|
|
22
22
|
__exportStar(require("./directionVectorEquation"), exports);
|
|
23
|
+
__exportStar(require("./drawAlineInGGB"), exports);
|
|
24
|
+
__exportStar(require("./placeAPoint"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"placeAPoint.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/cartesian/placeAPoint.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG,EAAE,CAAC;AAmCtB,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAY/C,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.testGGBAnswer = void 0;
|
|
4
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
5
|
+
const toolBarConstructor_1 = require("../../../../exercises/utils/geogebra/toolBarConstructor");
|
|
6
|
+
const point_1 = require("../../../../math/geometry/point");
|
|
7
|
+
const arrayHasSameElement_1 = require("../../../../utils/arrayHasSameElement");
|
|
8
|
+
const getPlaceAPointQuestion = () => {
|
|
9
|
+
const point = point_1.PointConstructor.random("A");
|
|
10
|
+
const xMax = point.getXnumber() + 2;
|
|
11
|
+
const xMin = point.getXnumber() - 2;
|
|
12
|
+
const yMin = point.getYnumber() - 2;
|
|
13
|
+
const yMax = point.getYnumber() + 2;
|
|
14
|
+
const question = {
|
|
15
|
+
ggbAnswer: [`(${point.getXnumber()},${point.getYnumber()})`],
|
|
16
|
+
instruction: `Placer le point $A$ de coordonnées $${point.toTexWithCoords()}$.`,
|
|
17
|
+
keys: [],
|
|
18
|
+
studentGgbOptions: {
|
|
19
|
+
customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
|
|
20
|
+
point: true,
|
|
21
|
+
}),
|
|
22
|
+
coords: [-11, 11, -11, 11],
|
|
23
|
+
isGridSimple: false,
|
|
24
|
+
isXAxesNatural: true,
|
|
25
|
+
enableShiftDragZoom: true,
|
|
26
|
+
},
|
|
27
|
+
identifiers: {},
|
|
28
|
+
};
|
|
29
|
+
return question;
|
|
30
|
+
};
|
|
31
|
+
const isGGBAnswerValid = (ans, { ggbAnswer }) => {
|
|
32
|
+
return (0, arrayHasSameElement_1.arrayHasSameElements)(ans.map((s) => s.split("=")[1]), ggbAnswer);
|
|
33
|
+
};
|
|
34
|
+
exports.testGGBAnswer = {
|
|
35
|
+
id: "placeAPoint",
|
|
36
|
+
label: "Placer un point dans un repère orthonormé",
|
|
37
|
+
levels: ["2nde"],
|
|
38
|
+
isSingleStep: true,
|
|
39
|
+
sections: ["Géométrie euclidienne"],
|
|
40
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getPlaceAPointQuestion, nb),
|
|
41
|
+
answerType: "GGB",
|
|
42
|
+
qcmTimer: 60,
|
|
43
|
+
freeTimer: 60,
|
|
44
|
+
isGGBAnswerValid,
|
|
45
|
+
subject: "Mathématiques",
|
|
46
|
+
};
|
|
@@ -55,7 +55,7 @@ exports.convexityTrinomialsGeo = {
|
|
|
55
55
|
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getConvexityTrinomialsGeoQuestion, nb),
|
|
56
56
|
qcmTimer: 60,
|
|
57
57
|
freeTimer: 60,
|
|
58
|
-
answerType: "
|
|
58
|
+
answerType: "QCU",
|
|
59
59
|
getPropositions,
|
|
60
60
|
isAnswerValid,
|
|
61
61
|
hasGeogebra: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawAVectorInGGB.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/vectors/drawAVectorInGGB.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAIT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuDF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
|