math-exercises 2.1.4 → 2.1.6
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 +1 -1
- package/lib/exercises/exercise.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/index.d.ts +1 -0
- package/lib/exercises/math/calculLitteral/systems/index.d.ts.map +1 -1
- package/lib/exercises/math/calculLitteral/systems/index.js +1 -0
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts +9 -0
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.d.ts.map +1 -0
- package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +63 -0
- package/lib/exercises/math/derivation/derivative/expDerivativeFour.d.ts +8 -0
- package/lib/exercises/math/derivation/derivative/expDerivativeFour.d.ts.map +1 -0
- package/lib/exercises/math/derivation/derivative/expDerivativeFour.js +57 -0
- package/lib/exercises/math/derivation/derivative/index.d.ts +1 -0
- package/lib/exercises/math/derivation/derivative/index.d.ts.map +1 -1
- package/lib/exercises/math/derivation/derivative/index.js +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.js +4 -3
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.d.ts +9 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js +59 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.d.ts +10 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.d.ts.map +1 -0
- package/lib/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.js +49 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts +2 -0
- package/lib/exercises/math/sequences/arithmetic/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/arithmetic/index.js +2 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts +9 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map +1 -0
- package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.js +62 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts +1 -0
- package/lib/exercises/math/sequences/geometric/index.d.ts.map +1 -1
- package/lib/exercises/math/sequences/geometric/index.js +1 -0
- package/lib/exercises/pc/chemicalElements/calculateProtonsNumberFromMass.js +1 -1
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts +9 -0
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.js +73 -0
- package/lib/exercises/pc/chemicalElements/index.d.ts +1 -0
- package/lib/exercises/pc/chemicalElements/index.d.ts.map +1 -1
- package/lib/exercises/pc/chemicalElements/index.js +1 -0
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.d.ts +8 -0
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/calculateCombustionEnergy.js +64 -0
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts +8 -0
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/calculateSynthesisEfficiency.js +52 -0
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.d.ts +8 -0
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +61 -0
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.d.ts +8 -0
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +68 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts +5 -0
- package/lib/exercises/pc/chemicalReactions/index.d.ts.map +1 -0
- package/lib/exercises/pc/chemicalReactions/index.js +20 -0
- package/lib/exercises/pc/electricity/electricChargeFromIntensity.d.ts +8 -0
- package/lib/exercises/pc/electricity/electricChargeFromIntensity.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/electricChargeFromIntensity.js +51 -0
- package/lib/exercises/pc/electricity/electricEnergyFromPower.d.ts +8 -0
- package/lib/exercises/pc/electricity/electricEnergyFromPower.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/electricEnergyFromPower.js +70 -0
- package/lib/exercises/pc/electricity/index.d.ts +3 -0
- package/lib/exercises/pc/electricity/index.d.ts.map +1 -0
- package/lib/exercises/pc/electricity/index.js +18 -0
- package/lib/exercises/pc/fluids/index.d.ts +2 -0
- package/lib/exercises/pc/fluids/index.d.ts.map +1 -0
- package/lib/exercises/pc/fluids/index.js +17 -0
- package/lib/exercises/pc/fluids/mariotte.d.ts +11 -0
- package/lib/exercises/pc/fluids/mariotte.d.ts.map +1 -0
- package/lib/exercises/pc/fluids/mariotte.js +73 -0
- package/lib/exercises/pc/forces/forceWork.d.ts +9 -0
- package/lib/exercises/pc/forces/forceWork.d.ts.map +1 -0
- package/lib/exercises/pc/forces/forceWork.js +51 -0
- package/lib/exercises/pc/forces/gravitationalAttractionValue.js +1 -1
- package/lib/exercises/pc/forces/index.d.ts +2 -0
- package/lib/exercises/pc/forces/index.d.ts.map +1 -1
- package/lib/exercises/pc/forces/index.js +2 -0
- package/lib/exercises/pc/forces/pressingForce.d.ts +19 -0
- package/lib/exercises/pc/forces/pressingForce.d.ts.map +1 -0
- package/lib/exercises/pc/forces/pressingForce.js +97 -0
- package/lib/exercises/pc/index.d.ts +5 -0
- package/lib/exercises/pc/index.d.ts.map +1 -1
- package/lib/exercises/pc/index.js +5 -0
- package/lib/exercises/pc/kineticEnergy.js +1 -1
- package/lib/exercises/pc/math/proportionnalityCoeffFromLine.js +1 -1
- package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts +8 -0
- package/lib/exercises/pc/mecanicalWaves/elongationReading.d.ts.map +1 -0
- package/lib/exercises/pc/mecanicalWaves/elongationReading.js +72 -0
- package/lib/exercises/pc/mecanicalWaves/index.d.ts +2 -0
- package/lib/exercises/pc/mecanicalWaves/index.d.ts.map +1 -0
- package/lib/exercises/pc/mecanicalWaves/index.js +17 -0
- package/lib/exercises/pc/mole/concentrationReading.d.ts +5 -0
- package/lib/exercises/pc/mole/concentrationReading.d.ts.map +1 -0
- package/lib/exercises/pc/mole/concentrationReading.js +57 -0
- package/lib/exercises/pc/mole/index.d.ts +4 -0
- package/lib/exercises/pc/mole/index.d.ts.map +1 -0
- package/lib/exercises/pc/mole/index.js +20 -0
- package/lib/exercises/pc/mole/molFromMass.d.ts +8 -0
- package/lib/exercises/pc/mole/molFromMass.d.ts.map +1 -0
- package/lib/exercises/pc/mole/molFromMass.js +45 -0
- package/lib/exercises/pc/mole/molFromMolarMass.d.ts +8 -0
- package/lib/exercises/pc/mole/molFromMolarMass.d.ts.map +1 -0
- package/lib/exercises/pc/mole/molFromMolarMass.js +45 -0
- package/lib/exercises/pc/mole/molarMass.d.ts +5 -0
- package/lib/exercises/pc/mole/molarMass.d.ts.map +1 -0
- package/lib/exercises/pc/mole/molarMass.js +48 -0
- package/lib/exercises/pc/waves/index.d.ts +1 -0
- package/lib/exercises/pc/waves/index.d.ts.map +1 -1
- package/lib/exercises/pc/waves/index.js +1 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts +9 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.d.ts.map +1 -0
- package/lib/exercises/pc/waves/periodicWaveCelerity.js +74 -0
- package/lib/index.d.ts +78 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValue.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValue.js +1 -0
- package/lib/math/trigonometry/remarkableValues.d.ts +1 -0
- package/lib/math/trigonometry/remarkableValues.d.ts.map +1 -1
- package/lib/math/trigonometry/remarkableValues.js +22 -1
- package/lib/math/utils/latex/unfrenchify.d.ts +2 -0
- package/lib/math/utils/latex/unfrenchify.d.ts.map +1 -0
- package/lib/math/utils/latex/unfrenchify.js +7 -0
- package/lib/math/utils/random/randfloat.d.ts +1 -1
- package/lib/math/utils/random/randfloat.d.ts.map +1 -1
- package/lib/math/utils/random/randfloat.js +8 -1
- package/lib/pc/measure/measure.d.ts +8 -0
- package/lib/pc/measure/measure.d.ts.map +1 -1
- package/lib/pc/measure/measure.js +15 -6
- package/lib/pc/molecularChemistry/molecule.js +2 -2
- package/lib/server.d.ts.map +1 -1
- package/lib/server.js +10 -1
- package/lib/tree/nodes/equations/equalNode.js +1 -1
- package/lib/tree/nodes/functions/cosNode.d.ts +1 -1
- package/lib/tree/nodes/functions/cosNode.js +3 -3
- package/lib/tree/nodes/functions/sinNode.js +1 -1
- package/lib/tree/nodes/operators/multiplyNode.d.ts.map +1 -1
- package/lib/tree/nodes/operators/multiplyNode.js +6 -1
- package/package.json +1 -1
|
@@ -58,5 +58,5 @@ export interface Exercise<TIdentifiers = {}> {
|
|
|
58
58
|
}
|
|
59
59
|
export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
|
|
60
60
|
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é" | "Puissances" | "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";
|
|
61
|
-
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";
|
|
61
|
+
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é";
|
|
62
62
|
//# 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,EA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,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,YAAY,GACZ,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,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,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,W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,SAAS,GACT,qBAAqB,GACrB,oBAAoB,GACpB,UAAU,GACV,mBAAmB,GACnB,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,YAAY,GACZ,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,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,wBAAwB,CAAC"}
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./basicSystemResolution"), exports);
|
|
18
18
|
__exportStar(require("./basicNiceValuesSystemResolution"), exports);
|
|
19
|
+
__exportStar(require("./verifySystemSolution"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
sysCoeffs: number[][];
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const verifySystemSolution: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=verifySystemSolution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifySystemSolution.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/systems/verifySystemSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC;IACtB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA8CF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CActD,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifySystemSolution = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const system_1 = require("../../../../math/systems/system");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const coinFlip_1 = require("../../../../utils/coinFlip");
|
|
9
|
+
const getVerifySystemSolutionQuestion = () => {
|
|
10
|
+
let x;
|
|
11
|
+
let y;
|
|
12
|
+
const isSolution = (0, coinFlip_1.coinFlip)();
|
|
13
|
+
let sys;
|
|
14
|
+
if (isSolution) {
|
|
15
|
+
sys = system_1.SystemConstructor.niceValues();
|
|
16
|
+
const sol = sys.solve();
|
|
17
|
+
x = sol.x.evaluate({});
|
|
18
|
+
y = sol.y.evaluate({});
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
sys = system_1.SystemConstructor.niceValues();
|
|
22
|
+
const sol = sys.solve();
|
|
23
|
+
x = sol.x.evaluate({}) + (0, randint_1.randint)(-5, 5);
|
|
24
|
+
y = sol.y.evaluate({}) + (0, randint_1.randint)(-5, 5, [0]);
|
|
25
|
+
}
|
|
26
|
+
const question = {
|
|
27
|
+
answer: isSolution ? "Oui" : "Non",
|
|
28
|
+
instruction: `Soit le système d'équations suivant :
|
|
29
|
+
|
|
30
|
+
$${sys.toTex()}$
|
|
31
|
+
|
|
32
|
+
Le couple $(${x};${y})$ est-il une solution de ce système ?`,
|
|
33
|
+
keys: [],
|
|
34
|
+
answerFormat: "raw",
|
|
35
|
+
identifiers: { sysCoeffs: sys.coeffs, x, y },
|
|
36
|
+
};
|
|
37
|
+
return question;
|
|
38
|
+
};
|
|
39
|
+
const getPropositions = (n, { answer }) => {
|
|
40
|
+
const propositions = [];
|
|
41
|
+
(0, exercise_1.addValidProp)(propositions, answer, "raw");
|
|
42
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Oui", "raw");
|
|
43
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "Non", "raw");
|
|
44
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "On ne peut pas savoir", "raw");
|
|
45
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
46
|
+
};
|
|
47
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
48
|
+
return ans === answer;
|
|
49
|
+
};
|
|
50
|
+
exports.verifySystemSolution = {
|
|
51
|
+
id: "verifySystemSolution",
|
|
52
|
+
label: "Vérifier si un couple est solution d'un système",
|
|
53
|
+
levels: ["2nde", "1reSpé"],
|
|
54
|
+
isSingleStep: true,
|
|
55
|
+
sections: ["Systèmes"],
|
|
56
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getVerifySystemSolutionQuestion, nb),
|
|
57
|
+
qcmTimer: 60,
|
|
58
|
+
freeTimer: 60,
|
|
59
|
+
getPropositions,
|
|
60
|
+
isAnswerValid,
|
|
61
|
+
subject: "Mathématiques",
|
|
62
|
+
answerType: "QCM",
|
|
63
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
affine1Coeffs: number[];
|
|
4
|
+
affine2Coeffs: number[];
|
|
5
|
+
};
|
|
6
|
+
export declare const expDerivativeFour: Exercise<Identifiers>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=expDerivativeFour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expDerivativeFour.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/expDerivativeFour.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,KAAK,WAAW,GAAG;IACjB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AA8DF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAcnD,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expDerivativeFour = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const affine_1 = require("../../../../math/polynomials/affine");
|
|
7
|
+
const expNode_1 = require("../../../../tree/nodes/functions/expNode");
|
|
8
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
9
|
+
const getExpDerivativeFourQuestion = () => {
|
|
10
|
+
const affine1 = affine_1.AffineConstructor.random();
|
|
11
|
+
const affine2 = affine_1.AffineConstructor.random();
|
|
12
|
+
const exp = new expNode_1.ExpNode(affine2.toTree());
|
|
13
|
+
const fct = new multiplyNode_1.MultiplyNode(affine1.toTree(), exp);
|
|
14
|
+
const deriv = new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine2.a * affine1.a, affine1.a + affine2.a * affine1.b).toTree(), exp);
|
|
15
|
+
//ae^cx+d + c(ax+b)e^cx+d = (a+c(ax+b))e^cx+d = (cax + a +cb) e^cx+d
|
|
16
|
+
const question = {
|
|
17
|
+
answer: deriv.toTex(),
|
|
18
|
+
instruction: `Déterminer la dérivée de la fonction $f(x) = ${fct.toTex()}$`,
|
|
19
|
+
keys: ["x", "exp"],
|
|
20
|
+
answerFormat: "tex",
|
|
21
|
+
identifiers: {
|
|
22
|
+
affine1Coeffs: affine1.coefficients,
|
|
23
|
+
affine2Coeffs: affine2.coefficients,
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
return question;
|
|
27
|
+
};
|
|
28
|
+
const getPropositions = (n, { answer }) => {
|
|
29
|
+
const propositions = [];
|
|
30
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
31
|
+
while (propositions.length < n) {
|
|
32
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, new multiplyNode_1.MultiplyNode(affine_1.AffineConstructor.random().toTree(), new expNode_1.ExpNode(affine_1.AffineConstructor.random().toTree())).toTex());
|
|
33
|
+
}
|
|
34
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
35
|
+
};
|
|
36
|
+
const isAnswerValid = (ans, { answer, affine1Coeffs, affine2Coeffs }) => {
|
|
37
|
+
const affine1 = new affine_1.Affine(affine1Coeffs[1], affine1Coeffs[0]);
|
|
38
|
+
const affine2 = new affine_1.Affine(affine2Coeffs[1], affine2Coeffs[0]);
|
|
39
|
+
const exp = new expNode_1.ExpNode(affine2.toTree());
|
|
40
|
+
const deriv = new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine2.a * affine1.a, affine1.a + affine2.a * affine1.b).toTree(), exp);
|
|
41
|
+
const texs = deriv.toAllValidTexs();
|
|
42
|
+
return texs.includes(ans);
|
|
43
|
+
};
|
|
44
|
+
exports.expDerivativeFour = {
|
|
45
|
+
id: "expDerivativeFour",
|
|
46
|
+
connector: "=",
|
|
47
|
+
label: "Dérivée de $(ax+b)e^{cx+d}$",
|
|
48
|
+
levels: ["1reSpé", "TermSpé", "MathComp"],
|
|
49
|
+
isSingleStep: true,
|
|
50
|
+
sections: ["Dérivation", "Exponentielle"],
|
|
51
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getExpDerivativeFourQuestion, nb),
|
|
52
|
+
qcmTimer: 60,
|
|
53
|
+
freeTimer: 60,
|
|
54
|
+
getPropositions,
|
|
55
|
+
isAnswerValid,
|
|
56
|
+
subject: "Mathématiques",
|
|
57
|
+
};
|
|
@@ -2,6 +2,7 @@ export { constanteDerivative } from "./constanteDerivative";
|
|
|
2
2
|
export * from "./expDerivativeOne";
|
|
3
3
|
export * from "./expDerivativeThree";
|
|
4
4
|
export * from "./expDerivativeTwo";
|
|
5
|
+
export * from "./expDerivativeFour";
|
|
5
6
|
export { firstDegreeDerivative } from "./firstDegreeDerivative";
|
|
6
7
|
export * from "./inverseFunctionDerivative";
|
|
7
8
|
export * from "./lnDerivativeOne";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/derivation/derivative/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC"}
|
|
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "constanteDerivative", { enumerable: true, get: f
|
|
|
20
20
|
__exportStar(require("./expDerivativeOne"), exports);
|
|
21
21
|
__exportStar(require("./expDerivativeThree"), exports);
|
|
22
22
|
__exportStar(require("./expDerivativeTwo"), exports);
|
|
23
|
+
__exportStar(require("./expDerivativeFour"), exports);
|
|
23
24
|
var firstDegreeDerivative_1 = require("./firstDegreeDerivative");
|
|
24
25
|
Object.defineProperty(exports, "firstDegreeDerivative", { enumerable: true, get: function () { return firstDegreeDerivative_1.firstDegreeDerivative; } });
|
|
25
26
|
__exportStar(require("./inverseFunctionDerivative"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arithmeticFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"arithmeticFindExplicitFormula.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplicitFormula.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAsDF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAc/D,CAAC"}
|
|
@@ -27,9 +27,10 @@ const getPropositions = (n, { answer, firstValue, reason }) => {
|
|
|
27
27
|
const propositions = [];
|
|
28
28
|
(0, exercise_1.addValidProp)(propositions, answer);
|
|
29
29
|
while (propositions.length < n) {
|
|
30
|
-
(0, exercise_1.tryToAddWrongProp)(propositions,
|
|
31
|
-
.
|
|
32
|
-
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "u_n=" +
|
|
31
|
+
new polynomial_1.Polynomial([firstValue + (0, randint_1.randint)(-3, 4), reason + (0, randint_1.randint)(-3, 4, [-reason])], "n")
|
|
32
|
+
.toTree()
|
|
33
|
+
.toTex());
|
|
33
34
|
}
|
|
34
35
|
return (0, shuffle_1.shuffle)(propositions);
|
|
35
36
|
};
|
package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
firstValue: number;
|
|
4
|
+
reason: number;
|
|
5
|
+
firstRank: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const arithmeticFindExplicitFormulaFirstTermRandom: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=arithmeticFindExplictFormulaFirstTermRandom.d.ts.map
|
package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmeticFindExplictFormulaFirstTermRandom.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAiEF,eAAO,MAAM,4CAA4C,EAAE,QAAQ,CAAC,WAAW,CAgB5E,CAAC"}
|
package/lib/exercises/math/sequences/arithmetic/arithmeticFindExplictFormulaFirstTermRandom.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.arithmeticFindExplicitFormulaFirstTermRandom = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const polynomial_1 = require("../../../../math/polynomials/polynomial");
|
|
7
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
8
|
+
const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
|
|
9
|
+
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
10
|
+
const shuffle_1 = require("../../../../utils/shuffle");
|
|
11
|
+
const getArithmeticFindExplicitFormulaFirstTermRandom = () => {
|
|
12
|
+
const firstRank = (0, randint_1.randint)(0, 8);
|
|
13
|
+
const firstValue = (0, randint_1.randint)(-10, 10);
|
|
14
|
+
const reason = (0, randint_1.randint)(-10, 10, [0]);
|
|
15
|
+
const formula = new polynomial_1.Polynomial([firstValue - firstRank * reason, reason], "n");
|
|
16
|
+
const answer = "u_n=" + formula.toTex();
|
|
17
|
+
const question = {
|
|
18
|
+
instruction: `$(u_n)$ est une suite arithmétique de premier terme $u_{${firstRank}} = ${firstValue}$ et de raison $r = ${reason}$. $\\\\$ Donner l'expression de $u_n$ en fonction de $n$.`,
|
|
19
|
+
answer,
|
|
20
|
+
keys: ["un", "equal", "n"],
|
|
21
|
+
answerFormat: "tex",
|
|
22
|
+
identifiers: { firstValue, reason, firstRank },
|
|
23
|
+
};
|
|
24
|
+
return question;
|
|
25
|
+
};
|
|
26
|
+
const getPropositions = (n, { answer, firstValue, reason }) => {
|
|
27
|
+
const propositions = [];
|
|
28
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
29
|
+
while (propositions.length < n) {
|
|
30
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "u_n=" +
|
|
31
|
+
new polynomial_1.Polynomial([firstValue + (0, randint_1.randint)(-3, 4), reason + (0, randint_1.randint)(-3, 4, [-reason])], "n")
|
|
32
|
+
.toTree()
|
|
33
|
+
.toTex());
|
|
34
|
+
}
|
|
35
|
+
return (0, shuffle_1.shuffle)(propositions);
|
|
36
|
+
};
|
|
37
|
+
const isAnswerValid = (ans, { reason, firstValue, firstRank }) => {
|
|
38
|
+
const formula = new polynomial_1.Polynomial([firstValue - firstRank * reason, reason], "n");
|
|
39
|
+
const equal = new equalNode_1.EqualNode(new variableNode_1.VariableNode("u_n"), formula.toTree(), {
|
|
40
|
+
allowRawRightChildAsSolution: true,
|
|
41
|
+
});
|
|
42
|
+
const texs = equal.toAllValidTexs();
|
|
43
|
+
console.log(texs);
|
|
44
|
+
return texs.includes(ans);
|
|
45
|
+
};
|
|
46
|
+
exports.arithmeticFindExplicitFormulaFirstTermRandom = {
|
|
47
|
+
id: "arithmeticFindExplicitFormulaFirstTermRandom",
|
|
48
|
+
connector: "=",
|
|
49
|
+
label: "Déterminer la formule générale d'une suite arithmétique (premier rang aléatoire)",
|
|
50
|
+
levels: ["1reESM", "1reSpé", "1reTech", "1rePro", "TermTech", "TermPro"],
|
|
51
|
+
sections: ["Suites"],
|
|
52
|
+
isSingleStep: false,
|
|
53
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticFindExplicitFormulaFirstTermRandom, nb),
|
|
54
|
+
qcmTimer: 60,
|
|
55
|
+
freeTimer: 60,
|
|
56
|
+
getPropositions,
|
|
57
|
+
isAnswerValid,
|
|
58
|
+
subject: "Mathématiques",
|
|
59
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
rank1: number;
|
|
4
|
+
rank2: number;
|
|
5
|
+
reason: number;
|
|
6
|
+
value1: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const arithmeticFindReasonRandomRange: Exercise<Identifiers>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=arithmeticFindReasonRandomRange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arithmeticFindReasonRandomRange.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/arithmeticFindReasonRandomRange.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAKlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAmCF,eAAO,MAAM,+BAA+B,EAAE,QAAQ,CAAC,WAAW,CAcjE,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.arithmeticFindReasonRandomRange = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
7
|
+
const shuffle_1 = require("../../../../utils/shuffle");
|
|
8
|
+
const getArithmeticFindReasonRandomRange = () => {
|
|
9
|
+
const rank1 = (0, randint_1.randint)(0, 10);
|
|
10
|
+
const rank2 = rank1 + (0, randint_1.randint)(2, 6);
|
|
11
|
+
const reason = (0, randint_1.randint)(-10, 10, [0]);
|
|
12
|
+
const value1 = (0, randint_1.randint)(-10, 10);
|
|
13
|
+
const value2 = reason * (rank2 - rank1) + value1;
|
|
14
|
+
const answer = reason + "";
|
|
15
|
+
const question = {
|
|
16
|
+
instruction: `$(u_n)$ est une suite arithmétique. On sait que $u_{${rank1}} = ${value1}$ et $u_{${rank2}} = ${value2}$. Quelle est la raison de la suite $(u_n)$ ?`,
|
|
17
|
+
startStatement: "r",
|
|
18
|
+
answer,
|
|
19
|
+
keys: [],
|
|
20
|
+
answerFormat: "tex",
|
|
21
|
+
identifiers: { rank1, reason, value1, rank2 },
|
|
22
|
+
};
|
|
23
|
+
return question;
|
|
24
|
+
};
|
|
25
|
+
const getPropositions = (n, { answer }) => {
|
|
26
|
+
const propositions = [];
|
|
27
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
28
|
+
while (propositions.length < n) {
|
|
29
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, Number(answer) + (0, randint_1.randint)(-5, 6, [0]) + "");
|
|
30
|
+
}
|
|
31
|
+
return (0, shuffle_1.shuffle)(propositions);
|
|
32
|
+
};
|
|
33
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
34
|
+
return ans === answer;
|
|
35
|
+
};
|
|
36
|
+
exports.arithmeticFindReasonRandomRange = {
|
|
37
|
+
id: "arithmeticFindReasonRandomRange",
|
|
38
|
+
connector: "=",
|
|
39
|
+
label: "Déterminer la raison d'une suite arithmétique (écart aléatoire)",
|
|
40
|
+
levels: ["1reESM", "1reSpé", "1reTech", "1rePro", "TermTech", "TermPro"],
|
|
41
|
+
sections: ["Suites"],
|
|
42
|
+
isSingleStep: false,
|
|
43
|
+
getPropositions,
|
|
44
|
+
isAnswerValid,
|
|
45
|
+
qcmTimer: 60,
|
|
46
|
+
freeTimer: 60,
|
|
47
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getArithmeticFindReasonRandomRange, nb),
|
|
48
|
+
subject: "Mathématiques",
|
|
49
|
+
};
|
|
@@ -10,4 +10,6 @@ export * from "./recognizeReasonFromFirstTerms";
|
|
|
10
10
|
export * from "./recognizeReasonFromGraph";
|
|
11
11
|
export * from "./recognizeArithmeticFromGraph";
|
|
12
12
|
export * from "./arithmeticFirstTermsSum";
|
|
13
|
+
export * from "./arithmeticFindExplictFormulaFirstTermRandom";
|
|
14
|
+
export * from "./arithmeticFindReasonRandomRange";
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/arithmetic/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mCAAmC,CAAC"}
|
|
@@ -26,3 +26,5 @@ __exportStar(require("./recognizeReasonFromFirstTerms"), exports);
|
|
|
26
26
|
__exportStar(require("./recognizeReasonFromGraph"), exports);
|
|
27
27
|
__exportStar(require("./recognizeArithmeticFromGraph"), exports);
|
|
28
28
|
__exportStar(require("./arithmeticFirstTermsSum"), exports);
|
|
29
|
+
__exportStar(require("./arithmeticFindExplictFormulaFirstTermRandom"), exports);
|
|
30
|
+
__exportStar(require("./arithmeticFindReasonRandomRange"), exports);
|
package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../../exercises/exercise";
|
|
2
|
+
type Identifiers = {
|
|
3
|
+
reason: number;
|
|
4
|
+
firstValue: number;
|
|
5
|
+
firstRank: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const geometricFindExplicitFormulaFirstTermRandom: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=geometricFindExplicitFormulaFirstTermRandom.d.ts.map
|
package/lib/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometricFindExplicitFormulaFirstTermRandom.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/geometricFindExplicitFormulaFirstTermRandom.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAgFF,eAAO,MAAM,2CAA2C,EAAE,QAAQ,CAAC,WAAW,CAgB3E,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.geometricFindExplicitFormulaFirstTermRandom = void 0;
|
|
4
|
+
const exercise_1 = require("../../../../exercises/exercise");
|
|
5
|
+
const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
|
|
6
|
+
const randint_1 = require("../../../../math/utils/random/randint");
|
|
7
|
+
const numberNode_1 = require("../../../../tree/nodes/numbers/numberNode");
|
|
8
|
+
const equalNode_1 = require("../../../../tree/nodes/equations/equalNode");
|
|
9
|
+
const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
|
|
10
|
+
const powerNode_1 = require("../../../../tree/nodes/operators/powerNode");
|
|
11
|
+
const variableNode_1 = require("../../../../tree/nodes/variables/variableNode");
|
|
12
|
+
const shuffle_1 = require("../../../../utils/shuffle");
|
|
13
|
+
const substractNode_1 = require("../../../../tree/nodes/operators/substractNode");
|
|
14
|
+
const getGeometricFindExplicitFormulaFirstTermRandom = () => {
|
|
15
|
+
const firstRank = (0, randint_1.randint)(0, 9);
|
|
16
|
+
const firstValue = (0, randint_1.randint)(1, 10);
|
|
17
|
+
const reason = (0, randint_1.randint)(2, 10);
|
|
18
|
+
const formula = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(firstValue), new powerNode_1.PowerNode(new numberNode_1.NumberNode(reason), new substractNode_1.SubstractNode(new variableNode_1.VariableNode("n"), firstRank.toTree())));
|
|
19
|
+
const answer = "u_n=" + formula.toTex();
|
|
20
|
+
const question = {
|
|
21
|
+
instruction: `$(u_n)$ est une suite géométrique de premier terme $u_{${firstRank}} = ${firstValue}$ et de raison $q = ${reason}$. $\\\\$ Donner l'expression de $u_n$ en fonction de $n$.`,
|
|
22
|
+
answer,
|
|
23
|
+
keys: ["un", "equal", "n"],
|
|
24
|
+
answerFormat: "tex",
|
|
25
|
+
identifiers: { reason, firstValue, firstRank },
|
|
26
|
+
};
|
|
27
|
+
return question;
|
|
28
|
+
};
|
|
29
|
+
const getPropositions = (n, { answer, reason, firstValue }) => {
|
|
30
|
+
const propositions = [];
|
|
31
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
32
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "u_n=" +
|
|
33
|
+
new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(reason), new powerNode_1.PowerNode(new numberNode_1.NumberNode(firstValue), new variableNode_1.VariableNode("n"))).toTex());
|
|
34
|
+
while (propositions.length < n) {
|
|
35
|
+
const wrongAnswer = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(firstValue + (0, randint_1.randint)(-firstValue, 2 * firstValue + 1, [-firstValue])), new powerNode_1.PowerNode(new numberNode_1.NumberNode(reason + +(0, randint_1.randint)(-reason + 1, 2 * reason + 1)), new variableNode_1.VariableNode("n")));
|
|
36
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, "u_n=" + wrongAnswer.toTex());
|
|
37
|
+
}
|
|
38
|
+
return (0, shuffle_1.shuffle)(propositions);
|
|
39
|
+
};
|
|
40
|
+
const isAnswerValid = (ans, { reason, firstValue, firstRank }) => {
|
|
41
|
+
const formula = new multiplyNode_1.MultiplyNode(new numberNode_1.NumberNode(firstValue), new powerNode_1.PowerNode(new numberNode_1.NumberNode(reason), new substractNode_1.SubstractNode(new variableNode_1.VariableNode("n"), firstRank.toTree())));
|
|
42
|
+
const equal = new equalNode_1.EqualNode(new variableNode_1.VariableNode("u_n"), formula, {
|
|
43
|
+
allowRawRightChildAsSolution: true,
|
|
44
|
+
});
|
|
45
|
+
const texs = equal.toAllValidTexs();
|
|
46
|
+
console.log(ans, texs);
|
|
47
|
+
return texs.includes(ans);
|
|
48
|
+
};
|
|
49
|
+
exports.geometricFindExplicitFormulaFirstTermRandom = {
|
|
50
|
+
id: "geometricFindExplicitFormulaFirstTermRandom",
|
|
51
|
+
connector: "=",
|
|
52
|
+
label: "Déterminer la formule générale d'une suite géométrique (premier rang aléatoire)",
|
|
53
|
+
levels: ["1reESM", "1reSpé", "1reTech", "1rePro", "TermTech", "TermPro"],
|
|
54
|
+
sections: ["Suites"],
|
|
55
|
+
isSingleStep: false,
|
|
56
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGeometricFindExplicitFormulaFirstTermRandom, nb),
|
|
57
|
+
qcmTimer: 60,
|
|
58
|
+
freeTimer: 60,
|
|
59
|
+
getPropositions,
|
|
60
|
+
isAnswerValid,
|
|
61
|
+
subject: "Mathématiques",
|
|
62
|
+
};
|
|
@@ -4,4 +4,5 @@ export * from "./geometricFindReason";
|
|
|
4
4
|
export * from "./geometricFirstTermsSum";
|
|
5
5
|
export * from "./geometricReasonUsage";
|
|
6
6
|
export * from "./geometricRecurrenceFormulaUsage";
|
|
7
|
+
export * from "./geometricFindExplicitFormulaFirstTermRandom";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/sequences/geometric/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,+CAA+C,CAAC"}
|
|
@@ -20,3 +20,4 @@ __exportStar(require("./geometricFindReason"), exports);
|
|
|
20
20
|
__exportStar(require("./geometricFirstTermsSum"), exports);
|
|
21
21
|
__exportStar(require("./geometricReasonUsage"), exports);
|
|
22
22
|
__exportStar(require("./geometricRecurrenceFormulaUsage"), exports);
|
|
23
|
+
__exportStar(require("./geometricFindExplicitFormulaFirstTermRandom"), exports);
|
|
@@ -15,7 +15,7 @@ const getCalculateProtonsNumberFromMassQuestion = () => {
|
|
|
15
15
|
const atomNucleusMass = atoms_1.nucleonMass.value.times(atom.masseAtomique);
|
|
16
16
|
const instruction = `Le noyau d'un atome ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} a pour masse $m = ${atomNucleusMass.toTex({
|
|
17
17
|
scientific: 2,
|
|
18
|
-
})}$ et possède $${(0, round_1.round)(atom.masseAtomique, 0) - atom.numeroAtomique}$ neutrons. Déterminer le nombre de protons de cet atome.`;
|
|
18
|
+
})} kg$ et possède $${(0, round_1.round)(atom.masseAtomique, 0) - atom.numeroAtomique}$ neutrons. Déterminer le nombre de protons de cet atome.`;
|
|
19
19
|
// const help = ` $m_{\\text{nucléon}} = ${nucleonMass.value.toTex({
|
|
20
20
|
// scientific: 2,
|
|
21
21
|
// })}\\ ${nucleonMass.unit}$`;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Exercise } from "../../../exercises/exercise";
|
|
2
|
+
import { AtomSymbols } from "../../../pc/molecularChemistry/atomSymbols";
|
|
3
|
+
type Identifiers = {
|
|
4
|
+
atomSymbol: AtomSymbols;
|
|
5
|
+
sampleMass: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const findAtomEntitiesNumberFromMass: Exercise<Identifiers>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=findAtomEntitiesNumberFromMass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findAtomEntitiesNumberFromMass.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/findAtomEntitiesNumberFromMass.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAKtE,KAAK,WAAW,GAAG;IACjB,UAAU,EAAE,WAAW,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAyEF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findAtomEntitiesNumberFromMass = void 0;
|
|
4
|
+
const frenchify_1 = require("../../../math/utils/latex/frenchify");
|
|
5
|
+
const exercise_1 = require("../../../exercises/exercise");
|
|
6
|
+
const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
|
|
7
|
+
const randfloat_1 = require("../../../math/utils/random/randfloat");
|
|
8
|
+
const randint_1 = require("../../../math/utils/random/randint");
|
|
9
|
+
const round_1 = require("../../../math/utils/round");
|
|
10
|
+
const atoms_1 = require("../../../pc/constants/atoms");
|
|
11
|
+
const measure_1 = require("../../../pc/measure/measure");
|
|
12
|
+
const atome_1 = require("../../../pc/molecularChemistry/atome");
|
|
13
|
+
const random_1 = require("../../../utils/random");
|
|
14
|
+
const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
|
|
15
|
+
const getFindAtomEntitiesNumberFromMassQuestion = () => {
|
|
16
|
+
const atom = (0, random_1.random)(atome_1.atomes.slice(5, 30));
|
|
17
|
+
const sampleMass = (0, round_1.round)((0, randfloat_1.randfloat)(0.1, 2), 2);
|
|
18
|
+
const sampleMassMeasure = new measure_1.Measure(sampleMass, 0);
|
|
19
|
+
const atomMass = atoms_1.nucleonMass.value.times(atom.masseAtomique).toSignificant(2);
|
|
20
|
+
const entitiesNumber = sampleMassMeasure.divide(atomMass).toSignificant(2);
|
|
21
|
+
console.log("entitiesNumber", entitiesNumber);
|
|
22
|
+
const instruction = `Un échantillon a une masse $m = ${(0, frenchify_1.frenchify)(sampleMass)}\\ kg$ ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name}. La masse d'un atome ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} est de $${atomMass.toTex({ scientific: 2 })}\\ kg$.
|
|
23
|
+
Déterminer le nombre d'atomes ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(atom.name) ? "d'" : "de "}${atom.name} composant l'échantillon.`;
|
|
24
|
+
const question = {
|
|
25
|
+
answer: `${entitiesNumber.toSignificant(2).toTex()}`,
|
|
26
|
+
instruction,
|
|
27
|
+
keys: ["timesTenPower"],
|
|
28
|
+
answerFormat: "tex",
|
|
29
|
+
identifiers: { atomSymbol: atom.symbole, sampleMass },
|
|
30
|
+
};
|
|
31
|
+
return question;
|
|
32
|
+
};
|
|
33
|
+
const getPropositions = (n, { answer, atomSymbol, sampleMass }) => {
|
|
34
|
+
const propositions = [];
|
|
35
|
+
(0, exercise_1.addValidProp)(propositions, answer);
|
|
36
|
+
const atom = atome_1.atomes.find((a) => a.symbole === atomSymbol);
|
|
37
|
+
const sampleMassMeasure = new measure_1.Measure(sampleMass, 0);
|
|
38
|
+
const atomMass = atoms_1.nucleonMass.value.times(atom.masseAtomique).toSignificant(2);
|
|
39
|
+
const entitiesNumber = sampleMassMeasure.divide(atomMass).toSignificant(2);
|
|
40
|
+
const wrongDivision = atomMass.divide(sampleMassMeasure).toSignificant(2);
|
|
41
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${wrongDivision.toTex({ scientific: 2 })}`);
|
|
42
|
+
const wrongCalculation = atomMass.times(sampleMassMeasure).toSignificant(2);
|
|
43
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${wrongCalculation.toTex({ scientific: 2 })}`);
|
|
44
|
+
while (propositions.length < n) {
|
|
45
|
+
const wrongPower = entitiesNumber
|
|
46
|
+
.times(new measure_1.Measure(1, (0, randint_1.randint)(-2, 2, [0])))
|
|
47
|
+
.toTex({ scientific: 0 });
|
|
48
|
+
(0, exercise_1.tryToAddWrongProp)(propositions, `${wrongPower}`);
|
|
49
|
+
}
|
|
50
|
+
return (0, exercise_1.shuffleProps)(propositions, n);
|
|
51
|
+
};
|
|
52
|
+
const isAnswerValid = (ans, { answer }) => {
|
|
53
|
+
// const atom = atomes.find(a => a.symbole === atomSymbol)!
|
|
54
|
+
// const sampleMassMeasure = new Measure(sampleMass, 0);
|
|
55
|
+
// const atomMass = nucleonMass.value.times(atom.masseAtomique).toSignificant(2);
|
|
56
|
+
// const entitiesNumber = sampleMassMeasure.divide(atomMass).toSignificant(2);
|
|
57
|
+
// const texs = entitiesNumber.toAllValidTexs();
|
|
58
|
+
// return texs.includes(ans);
|
|
59
|
+
return ans === answer;
|
|
60
|
+
};
|
|
61
|
+
exports.findAtomEntitiesNumberFromMass = {
|
|
62
|
+
id: "findAtomEntitiesNumberFromMass",
|
|
63
|
+
label: "Déterminer le nombre d'entités d'un atome dans un échantillon",
|
|
64
|
+
levels: ["2nde"],
|
|
65
|
+
isSingleStep: true,
|
|
66
|
+
sections: ["Chimie organique"],
|
|
67
|
+
generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFindAtomEntitiesNumberFromMassQuestion, nb),
|
|
68
|
+
qcmTimer: 60,
|
|
69
|
+
freeTimer: 60,
|
|
70
|
+
getPropositions,
|
|
71
|
+
isAnswerValid,
|
|
72
|
+
subject: "Chimie",
|
|
73
|
+
};
|
|
@@ -6,4 +6,5 @@ export * from "./weightPercent";
|
|
|
6
6
|
export * from "./calculateVolumetricMass";
|
|
7
7
|
export * from "./findValenceElectronsNumberFromElectronicConfiguration";
|
|
8
8
|
export * from "./identifyRightElectronicConfiguration";
|
|
9
|
+
export * from "./findAtomEntitiesNumberFromMass";
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yDAAyD,CAAC;AACxE,cAAc,wCAAwC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/chemicalElements/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yDAAyD,CAAC;AACxE,cAAc,wCAAwC,CAAC;AACvD,cAAc,kCAAkC,CAAC"}
|