math-exercises 2.2.36 → 2.2.38

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.
Files changed (82) hide show
  1. package/lib/exercises/exercise.d.ts +5 -0
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/ordering/framing.d.ts.map +1 -1
  4. package/lib/exercises/math/calcul/ordering/framing.js +1 -0
  5. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.d.ts.map +1 -1
  6. package/lib/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.js +54 -26
  7. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.d.ts.map +1 -1
  8. package/lib/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.js +1 -0
  9. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.d.ts.map +1 -1
  10. package/lib/exercises/math/calculLitteral/inequations/squareFunctionInequation.js +1 -0
  11. package/lib/exercises/math/conversion/aeraConversion.d.ts.map +1 -1
  12. package/lib/exercises/math/conversion/aeraConversion.js +1 -2
  13. package/lib/exercises/math/functions/basics/graphicInequation.d.ts.map +1 -1
  14. package/lib/exercises/math/functions/basics/graphicInequation.js +1 -0
  15. package/lib/exercises/math/functions/basics/imageAntecedentFromSentence.d.ts +9 -0
  16. package/lib/exercises/math/functions/basics/imageAntecedentFromSentence.d.ts.map +1 -0
  17. package/lib/exercises/math/functions/basics/imageAntecedentFromSentence.js +76 -0
  18. package/lib/exercises/math/functions/basics/index.d.ts +1 -0
  19. package/lib/exercises/math/functions/basics/index.d.ts.map +1 -1
  20. package/lib/exercises/math/functions/basics/index.js +1 -0
  21. package/lib/exercises/math/functions/trinoms/rootsFromDevForm.d.ts.map +1 -1
  22. package/lib/exercises/math/functions/trinoms/rootsFromDevForm.js +1 -0
  23. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.d.ts.map +1 -1
  24. package/lib/exercises/math/functions/trinoms/secondDegreeInequation.js +1 -0
  25. package/lib/exercises/math/geometry/areas/circleRadiusFromArea.d.ts +7 -0
  26. package/lib/exercises/math/geometry/areas/circleRadiusFromArea.d.ts.map +1 -0
  27. package/lib/exercises/math/geometry/areas/circleRadiusFromArea.js +108 -0
  28. package/lib/exercises/math/geometry/areas/index.d.ts +3 -0
  29. package/lib/exercises/math/geometry/areas/index.d.ts.map +1 -1
  30. package/lib/exercises/math/geometry/areas/index.js +3 -0
  31. package/lib/exercises/math/geometry/areas/rectangleSideFromArea.d.ts +8 -0
  32. package/lib/exercises/math/geometry/areas/rectangleSideFromArea.d.ts.map +1 -0
  33. package/lib/exercises/math/geometry/areas/rectangleSideFromArea.js +95 -0
  34. package/lib/exercises/math/geometry/areas/squareSideFromArea.d.ts +8 -0
  35. package/lib/exercises/math/geometry/areas/squareSideFromArea.d.ts.map +1 -0
  36. package/lib/exercises/math/geometry/areas/squareSideFromArea.js +77 -0
  37. package/lib/exercises/math/geometry/cartesian/readAbscissOnSemiLine.js +1 -1
  38. package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.d.ts +7 -0
  39. package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.d.ts.map +1 -0
  40. package/lib/exercises/math/geometry/perimeters/circleRadiusFromPerimeter.js +102 -0
  41. package/lib/exercises/math/geometry/perimeters/index.d.ts +3 -0
  42. package/lib/exercises/math/geometry/perimeters/index.d.ts.map +1 -1
  43. package/lib/exercises/math/geometry/perimeters/index.js +3 -0
  44. package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.d.ts +8 -0
  45. package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.d.ts.map +1 -0
  46. package/lib/exercises/math/geometry/perimeters/rectangleSideFromPerimeter.js +114 -0
  47. package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.d.ts +7 -0
  48. package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.d.ts.map +1 -0
  49. package/lib/exercises/math/geometry/perimeters/squareSideFromPerimeter.js +74 -0
  50. package/lib/exercises/math/matrices/matrixInversibilityDomain.d.ts.map +1 -1
  51. package/lib/exercises/math/matrices/matrixInversibilityDomain.js +1 -0
  52. package/lib/exercises/math/primitive/expUPrimitive.d.ts.map +1 -1
  53. package/lib/exercises/math/primitive/expUPrimitive.js +1 -0
  54. package/lib/exercises/math/primitive/exponentialPrimitive.d.ts.map +1 -1
  55. package/lib/exercises/math/primitive/exponentialPrimitive.js +1 -0
  56. package/lib/exercises/math/primitive/logarithmePrimitive.d.ts.map +1 -1
  57. package/lib/exercises/math/primitive/logarithmePrimitive.js +1 -0
  58. package/lib/exercises/math/primitive/usualPrimitives.d.ts.map +1 -1
  59. package/lib/exercises/math/primitive/usualPrimitives.js +1 -0
  60. package/lib/exercises/math/probaStat/stats1var/averageList.d.ts.map +1 -1
  61. package/lib/exercises/math/probaStat/stats1var/averageList.js +12 -3
  62. package/lib/exercises/math/probaStat/stats1var/quartilesList.d.ts.map +1 -1
  63. package/lib/exercises/math/probaStat/stats1var/quartilesList.js +21 -18
  64. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.d.ts.map +1 -1
  65. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +1 -0
  66. package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.d.ts.map +1 -1
  67. package/lib/exercises/math/trigonometry/equationCosOnRandomInterval.js +14 -5
  68. package/lib/exercises/math/trigonometry/equationSinOnRandomInterval.js +1 -1
  69. package/lib/exercises/math/trigonometry/index.d.ts +1 -0
  70. package/lib/exercises/math/trigonometry/index.d.ts.map +1 -1
  71. package/lib/exercises/math/trigonometry/index.js +1 -1
  72. package/lib/exercises/pc/calibrationCurveOfSolution.js +4 -4
  73. package/lib/index.d.ts +22 -0
  74. package/lib/index.d.ts.map +1 -1
  75. package/lib/math/numbers/reals/real.d.ts +2 -0
  76. package/lib/math/numbers/reals/real.d.ts.map +1 -1
  77. package/lib/math/numbers/reals/real.js +7 -0
  78. package/lib/tree/nodes/operators/fractionNode.d.ts.map +1 -1
  79. package/lib/tree/nodes/operators/fractionNode.js +2 -1
  80. package/lib/types/keyIds.d.ts +1 -1
  81. package/lib/types/keyIds.d.ts.map +1 -1
  82. package/package.json +2 -1
@@ -76,10 +76,14 @@ export type GetStudentGGBOptions<TIdentifiers> = (args: TIdentifiers) => Geogebr
76
76
  export type RebuildIdentifiers<TIdentifiers> = (oldIdentifiers: any) => TIdentifiers;
77
77
  export type GetQuestionFromIdentifiers<TIdentifiers> = (identifiers: TIdentifiers) => Question<TIdentifiers>;
78
78
  export type QuestionHotFix<TIdentifiers> = (q: Question<TIdentifiers>) => Question<TIdentifiers>;
79
+ type PDFOptions = {
80
+ shouldSpreadPropositions?: boolean;
81
+ };
79
82
  export interface Exercise<TIdentifiers = {}> {
80
83
  id: string;
81
84
  isSingleStep: boolean;
82
85
  label: string;
86
+ pdfOptions?: PDFOptions;
83
87
  sections?: (MathSection | PCSection)[];
84
88
  levels?: MathLevel[];
85
89
  connector?: "=" | "\\iff" | "\\approx";
@@ -113,4 +117,5 @@ export interface Exercise<TIdentifiers = {}> {
113
117
  export type MathLevel = "6ème" | "5ème" | "4ème" | "3ème" | "2nde" | "1reTech" | "1reESM" | "1reSpé" | "TermSpé" | "TermTech" | "MathExp" | "MathComp" | "CAP" | "2ndPro" | "1rePro" | "TermPro";
114
118
  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";
115
119
  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é" | "Mécanique gravitationnelle" | "Spectrophotométrie" | "Quantique" | "Thermodynamique" | "Énergie";
120
+ export {};
116
121
  //# 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;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,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;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CA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GACR,SAAS,GACT,UAAU,GACV,SAAS,GACT,UAAU,GACV,KAAK,GACL,QAAQ,GACR,QAAQ,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,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
1
+ {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIhD,eAAO,MAAM,YAAY,UAChB,WAAW,EAAE,aACT,MAAM,WACT,KAAK,GAAG,KAAK,SA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QAAQ,GACR,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,uBAAuB,GACvB,oBAAoB,GACpB,eAAe,GACf,gBAAgB,GAChB,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GACjB,mBAAmB,GACnB,sBAAsB,GACtB,QAAQ,GACR,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,GACd,+CAA+C,GAC/C,OAAO,GACP,KAAK,GACL,wBAAwB,GACxB,SAAS,GACT,KAAK,GACL,aAAa,GACb,4BAA4B,GAC5B,oBAAoB,GACpB,WAAW,GACX,iBAAiB,GACjB,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"framing.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/framing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAwJF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAazC,CAAC"}
1
+ {"version":3,"file":"framing.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calcul/ordering/framing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAmBlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAwJF,eAAO,MAAM,OAAO,EAAE,QAAQ,CAAC,WAAW,CAczC,CAAC"}
@@ -139,4 +139,5 @@ exports.framing = {
139
139
  getPropositions,
140
140
  isAnswerValid,
141
141
  subject: "Mathématiques",
142
+ pdfOptions: { shouldSpreadPropositions: true },
142
143
  };
@@ -1 +1 @@
1
- {"version":3,"file":"doubleDistributivityWithCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAuGF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAgB/D,CAAC"}
1
+ {"version":3,"file":"doubleDistributivityWithCoeff.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/distributivity/doubleDistributivityWithCoeff.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AA4IF,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,WAAW,CAoB/D,CAAC"}
@@ -9,6 +9,46 @@ const randint_1 = require("../../../../math/utils/random/randint");
9
9
  const addNode_1 = require("../../../../tree/nodes/operators/addNode");
10
10
  const multiplyNode_1 = require("../../../../tree/nodes/operators/multiplyNode");
11
11
  const alignTex_1 = require("../../../../utils/latex/alignTex");
12
+ const getHint = ({ coeff, affine1, affine2 }) => {
13
+ return `Choisis deux facteurs de ce produit et multiplie les entre eux. Puis, multiplier le résultat obtenu par le troisième terme.`;
14
+ };
15
+ const getCorrection = (identifiers) => {
16
+ const affine1 = new affine_1.Affine(identifiers.affine1[1], identifiers.affine1[0]);
17
+ const affine2 = new affine_1.Affine(identifiers.affine2[1], identifiers.affine2[0]);
18
+ const affine3 = affine1.times(identifiers.coeff);
19
+ const statement = new multiplyNode_1.MultiplyNode(new multiplyNode_1.MultiplyNode(identifiers.coeff.toTree(), affine1.toTree()), affine2.toTree()).toTex();
20
+ return `On commence par multiplier les deux premiers termes entre eux :
21
+
22
+ ${(0, alignTex_1.alignTex)(`${statement} = ${new multiplyNode_1.MultiplyNode(affine1.times(identifiers.coeff).toTree(), affine2.toTree()).toTex()}`)}
23
+
24
+ Puis, on utilise la double distributivité :
25
+
26
+ ${(0, alignTex_1.alignTex)([
27
+ ["", "", new multiplyNode_1.MultiplyNode(affine3.toTree(), affine2.toTree()).toTex()],
28
+ [
29
+ "",
30
+ "=",
31
+ new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine3.a, 0).toTree(), new affine_1.Affine(affine2.a, 0).toTree(), { forceTimesSign: true }), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine3.a, 0).toTree(), affine2.b.toTree(), { forceTimesSign: true }), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(affine3.b.toTree(), new affine_1.Affine(affine2.a, 0).toTree(), { forceTimesSign: true }), new multiplyNode_1.MultiplyNode(affine3.b.toTree(), affine2.b.toTree(), {
32
+ forceTimesSign: true,
33
+ })))).toTex(),
34
+ ],
35
+ ["", "=", getAnswer(identifiers)],
36
+ ])}
37
+ `;
38
+ };
39
+ const getInstruction = (identifiers) => {
40
+ const affine1 = new affine_1.Affine(identifiers.affine1[1], identifiers.affine1[0]);
41
+ const affine2 = new affine_1.Affine(identifiers.affine2[1], identifiers.affine2[0]);
42
+ const statement = new multiplyNode_1.MultiplyNode(new multiplyNode_1.MultiplyNode(identifiers.coeff.toTree(), affine1.toTree()), affine2.toTree()).toTex();
43
+ return `Développer et réduire : $${statement}$`;
44
+ };
45
+ const getAnswer = (identifiers) => {
46
+ const affine1 = new affine_1.Affine(identifiers.affine1[1], identifiers.affine1[0]);
47
+ const affine2 = new affine_1.Affine(identifiers.affine2[1], identifiers.affine2[0]);
48
+ const affine3 = affine1.times(identifiers.coeff);
49
+ const answer = affine3.multiply(affine2).toTree().toTex();
50
+ return answer;
51
+ };
12
52
  const getDoubleDistributivityWithCoeffQuestion = () => {
13
53
  const coeff = (0, randint_1.randint)(-10, 11, [-1, 0, 1]);
14
54
  const affine1 = affine_1.AffineConstructor.random(undefined, {
@@ -17,35 +57,19 @@ const getDoubleDistributivityWithCoeffQuestion = () => {
17
57
  const affine2 = affine_1.AffineConstructor.random(undefined, {
18
58
  excludes: [0],
19
59
  });
20
- const statement = new multiplyNode_1.MultiplyNode(new multiplyNode_1.MultiplyNode(coeff.toTree(), affine1.toTree()), affine2.toTree()).toTex();
21
- const affine3 = affine1.times(coeff);
22
- const answer = affine3.multiply(affine2).toTree().toTex();
60
+ const identifiers = {
61
+ coeff,
62
+ affine1: affine1.coefficients,
63
+ affine2: affine2.coefficients,
64
+ };
23
65
  const question = {
24
- answer,
25
- instruction: `Développer et réduire : $${statement}$`,
66
+ answer: getAnswer(identifiers),
67
+ instruction: getInstruction(identifiers),
26
68
  keys: ["x"],
27
69
  answerFormat: "tex",
28
- identifiers: {
29
- coeff,
30
- affine1: affine1.coefficients,
31
- affine2: affine2.coefficients,
32
- },
33
- hint: `Choisis deux facteurs de ce produit et multiplie les entre eux. Puis, multiplier le résultat obtenu par le troisième terme.`,
34
- correction: `On commence par multiplier les deux premiers termes entre eux :
35
-
36
- ${(0, alignTex_1.alignTex)(`${statement} = ${new multiplyNode_1.MultiplyNode(affine1.times(coeff).toTree(), affine2.toTree()).toTex()}`)}
37
-
38
- Puis, on utilise la double distributivité :
39
-
40
- ${(0, alignTex_1.alignTex)([
41
- [
42
- new multiplyNode_1.MultiplyNode(affine3.toTree(), affine2.toTree()).toTex(),
43
- "=",
44
- new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine3.a, 0).toTree(), new affine_1.Affine(affine2.a, 0).toTree()), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(new affine_1.Affine(affine3.a, 0).toTree(), affine2.b.toTree()), new addNode_1.AddNode(new multiplyNode_1.MultiplyNode(affine3.b.toTree(), new affine_1.Affine(affine2.a, 0).toTree()), new multiplyNode_1.MultiplyNode(affine3.b.toTree(), affine2.b.toTree())))).toTex(),
45
- ],
46
- ["", "=", answer],
47
- ])}
48
- `,
70
+ identifiers: identifiers,
71
+ hint: getHint(identifiers),
72
+ correction: getCorrection(identifiers),
49
73
  };
50
74
  return question;
51
75
  };
@@ -83,4 +107,8 @@ exports.doubleDistributivityWithCoeff = {
83
107
  isGGBAnswerValid,
84
108
  subject: "Mathématiques",
85
109
  hasHintAndCorrection: true,
110
+ getHint,
111
+ getCorrection,
112
+ getAnswer,
113
+ getInstruction,
86
114
  };
@@ -1 +1 @@
1
- {"version":3,"file":"factorizeCanonicalFormWithSqrt.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAmGF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAehE,CAAC"}
1
+ {"version":3,"file":"factorizeCanonicalFormWithSqrt.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/factorisation/factorizeCanonicalFormWithSqrt.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAelC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAmGF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAgBhE,CAAC"}
@@ -85,4 +85,5 @@ exports.factorizeCanonicalFormWithSqrt = {
85
85
  isAnswerValid,
86
86
  subject: "Mathématiques",
87
87
  hasHintAndCorrection: true,
88
+ pdfOptions: { shouldSpreadPropositions: true },
88
89
  };
@@ -1 +1 @@
1
- {"version":3,"file":"squareFunctionInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/squareFunctionInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAc3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAoEF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAa1D,CAAC"}
1
+ {"version":3,"file":"squareFunctionInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/calculLitteral/inequations/squareFunctionInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAc3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,gBAAgB,EAAE,gBAAgB,CAAC;CACpC,CAAC;AAoEF,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,WAAW,CAc1D,CAAC"}
@@ -63,4 +63,5 @@ exports.squareFunctionInequation = {
63
63
  getPropositions,
64
64
  isAnswerValid,
65
65
  subject: "Mathématiques",
66
+ pdfOptions: { shouldSpreadPropositions: true },
66
67
  };
@@ -1 +1 @@
1
- {"version":3,"file":"aeraConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/aeraConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA4DF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
1
+ {"version":3,"file":"aeraConversion.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/conversion/aeraConversion.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,QAAQ,EAQT,MAAM,gBAAgB,CAAC;AAExB,KAAK,WAAW,GAAG;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA2DF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
@@ -36,8 +36,7 @@ const getPropositions = (n, { answer, randomAera, randomUnitIndex, randomUnitIns
36
36
  while (propositions.length < n) {
37
37
  const wrongAnswer = aeraDecimal
38
38
  .multiplyByPowerOfTen(2 * (0, randint_1.randint)(-2, 4, [randomUnitIndex - randomUnitInstructionIndex]))
39
- .value.toString()
40
- .replace(".", ",");
39
+ .value.frenchify();
41
40
  (0, exercise_1.tryToAddWrongProp)(propositions, wrongAnswer);
42
41
  }
43
42
  return (0, shuffle_1.shuffle)(propositions);
@@ -1 +1 @@
1
- {"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAM5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AA4LF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAenD,CAAC"}
1
+ {"version":3,"file":"graphicInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/graphicInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAQlC,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAM5D,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,WAAW,CAAA;KAAE,EAAE,CAAC;CAC7D,CAAC;AA4LF,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,WAAW,CAgBnD,CAAC"}
@@ -161,4 +161,5 @@ exports.graphicInequation = {
161
161
  isAnswerValid,
162
162
  hasGeogebra: true,
163
163
  subject: "Mathématiques",
164
+ pdfOptions: { shouldSpreadPropositions: true },
164
165
  };
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ isImage: boolean;
4
+ x: number;
5
+ y: number;
6
+ };
7
+ export declare const imageAntecedentFromSentence: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=imageAntecedentFromSentence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageAntecedentFromSentence.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/imageAntecedentFromSentence.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAMlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAsEF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAgB7D,CAAC"}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.imageAntecedentFromSentence = 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 coinFlip_1 = require("../../../../utils/alea/coinFlip");
8
+ const getPropositions = (n, { answer, isImage, x, y }) => {
9
+ const propositions = [];
10
+ (0, exercise_1.addValidProp)(propositions, answer);
11
+ (0, exercise_1.tryToAddWrongProp)(propositions, getAnswer({ isImage, x: y, y: x }));
12
+ (0, exercise_1.tryToAddWrongProp)(propositions, `${x}=${y}`);
13
+ (0, exercise_1.tryToAddWrongProp)(propositions, getAnswer({ isImage, x: y, y: y }));
14
+ // tryToAddWrongProp(propositions, getAnswer({ isImage, x: x, y: x }));
15
+ return (0, exercise_1.shuffleProps)(propositions, n);
16
+ };
17
+ const getAnswer = (identifiers) => {
18
+ return `f\\left(${identifiers.x}\\right)=${identifiers.y}`;
19
+ };
20
+ const getInstruction = (identifiers) => {
21
+ let instruction = "Traduire par une égalité la phrase suivante : \n \n";
22
+ instruction += identifiers.isImage
23
+ ? `
24
+ "L'image de $${identifiers.x}$ par $f$ est $${identifiers.y}$"
25
+ `
26
+ : `"Un antécédent de $${identifiers.y}$ par $f$ est $${identifiers.x}$"`;
27
+ return instruction;
28
+ };
29
+ const getHint = (identifiers) => {
30
+ return `Si $f(x) = y$, alors $x$ est un antécédent de $y$ par $f$, et $y$ est l'image de $x$ par $f$.`;
31
+ };
32
+ const getCorrection = (identifiers) => {
33
+ return `Si $f(x) = y$, alors $x$ est un antécédent de $y$ par $f$, et $y$ est l'image de $x$ par $f$. Ici, on a donc $${getAnswer(identifiers)}$`;
34
+ };
35
+ const getKeys = (identifiers) => {
36
+ return ["fParenthesis", "equal"];
37
+ };
38
+ const isAnswerValid = (ans, { answer, x, y }) => {
39
+ const reversed = answer.split("=").reverse().join("=");
40
+ return [answer, reversed].includes(ans);
41
+ };
42
+ const getImageAntecedentFromSentenceQuestion = () => {
43
+ const x = (0, randint_1.randint)(-10, 10);
44
+ const y = (0, randint_1.randint)(-10, 10, [x]);
45
+ const identifiers = {
46
+ isImage: (0, coinFlip_1.coinFlip)(),
47
+ x,
48
+ y,
49
+ };
50
+ const question = {
51
+ answer: getAnswer(identifiers),
52
+ instruction: getInstruction(identifiers),
53
+ keys: getKeys(identifiers),
54
+ answerFormat: "tex",
55
+ identifiers,
56
+ hint: getHint(identifiers),
57
+ correction: getCorrection(identifiers),
58
+ };
59
+ return question;
60
+ };
61
+ exports.imageAntecedentFromSentence = {
62
+ id: "imageAntecedentFromSentence",
63
+ connector: "\\iff",
64
+ label: "Traduire une phrase contenant image ou antécédent en une égalité",
65
+ isSingleStep: true,
66
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getImageAntecedentFromSentenceQuestion, nb),
67
+ qcmTimer: 60,
68
+ freeTimer: 60,
69
+ getPropositions,
70
+ isAnswerValid,
71
+ subject: "Mathématiques",
72
+ getHint,
73
+ getCorrection,
74
+ getAnswer,
75
+ hasHintAndCorrection: true,
76
+ };
@@ -7,4 +7,5 @@ export * from "./graphicInequation";
7
7
  export * from "./twoFunctionsEquation";
8
8
  export * from "./twoFunctionsInequation";
9
9
  export * from "./inverseImageFunctionTable";
10
+ export * from "./imageAntecedentFromSentence";
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/basics/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
@@ -23,3 +23,4 @@ __exportStar(require("./graphicInequation"), exports);
23
23
  __exportStar(require("./twoFunctionsEquation"), exports);
24
24
  __exportStar(require("./twoFunctionsInequation"), exports);
25
25
  __exportStar(require("./inverseImageFunctionTable"), exports);
26
+ __exportStar(require("./imageAntecedentFromSentence"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"rootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/rootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAelD,CAAC"}
1
+ {"version":3,"file":"rootsFromDevForm.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/rootsFromDevForm.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAQT,MAAM,0BAA0B,CAAC;AAQlC,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AA2CF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAgBlD,CAAC"}
@@ -54,4 +54,5 @@ exports.rootsFromDevForm = {
54
54
  freeTimer: 60,
55
55
  isAnswerValid,
56
56
  subject: "Mathématiques",
57
+ pdfOptions: { shouldSpreadPropositions: true },
57
58
  };
@@ -1 +1 @@
1
- {"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAc3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAsHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAcxD,CAAC"}
1
+ {"version":3,"file":"secondDegreeInequation.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/functions/trinoms/secondDegreeInequation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,gBAAgB,EAGjB,MAAM,mCAAmC,CAAC;AAc3C,KAAK,WAAW,GAAG;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,gBAAgB,CAAC;CAC5B,CAAC;AAsHF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAexD,CAAC"}
@@ -96,4 +96,5 @@ exports.secondDegreeInequation = {
96
96
  getPropositions,
97
97
  isAnswerValid,
98
98
  subject: "Mathématiques",
99
+ pdfOptions: { shouldSpreadPropositions: true },
99
100
  };
@@ -0,0 +1,7 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ area: number;
4
+ };
5
+ export declare const circleRadiusFromArea: Exercise<Identifiers>;
6
+ export {};
7
+ //# sourceMappingURL=circleRadiusFromArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circleRadiusFromArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/circleRadiusFromArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAclC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAyFF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAgBtD,CAAC"}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.circleRadiusFromArea = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randfloat_1 = require("../../../../math/utils/random/randfloat");
7
+ const round_1 = require("../../../../math/utils/round");
8
+ const sqrtNode_1 = require("../../../../tree/nodes/functions/sqrtNode");
9
+ const piNode_1 = require("../../../../tree/nodes/numbers/piNode");
10
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
11
+ const numberParser_1 = require("../../../../tree/parsers/numberParser");
12
+ const alignTex_1 = require("../../../../utils/latex/alignTex");
13
+ const getPropositions = (n, { answer, area }) => {
14
+ const propositions = [];
15
+ (0, exercise_1.addValidProp)(propositions, answer);
16
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(Math.sqrt(area), 2).frenchify());
17
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(area / Math.PI, 2).frenchify());
18
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(area / (2 * Math.PI), 2).frenchify());
19
+ while (propositions.length < n) {
20
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(1, 100, 2).frenchify());
21
+ }
22
+ return (0, exercise_1.shuffleProps)(propositions, n);
23
+ };
24
+ const getAnswer = (identifiers) => {
25
+ return (0, round_1.round)(Math.sqrt(identifiers.area / Math.PI), 2).frenchify();
26
+ };
27
+ const getInstruction = (identifiers) => {
28
+ return `Calculer le rayon d'un cercle d'aire $${identifiers.area.frenchify()}$. Arrondir au centième.`;
29
+ };
30
+ const getHint = (identifiers) => {
31
+ return `L'aire d'un cercle est égale à :
32
+
33
+ $$
34
+ \\pi\\times r^2
35
+ $$
36
+
37
+ où $r$ est le rayon.`;
38
+ };
39
+ const getCorrection = (identifiers) => {
40
+ const r2 = identifiers.area / Math.PI;
41
+ return `L'aire d'un cercle est égale à :
42
+
43
+ $$
44
+ \\pi\\times r^2
45
+ $$
46
+
47
+ où $r$ est le rayon.
48
+
49
+ Ici, on a donc :
50
+
51
+ $$
52
+ ${identifiers.area.frenchify()} = \\pi\\times r^2
53
+ $$
54
+
55
+ On isole $r^2$ dans cette équation :
56
+
57
+ ${(0, alignTex_1.alignTex)([
58
+ ["r^2", "=", new fractionNode_1.FractionNode(identifiers.area.toTree(), piNode_1.PiNode).toTex()],
59
+ ["", "\\approx", (0, round_1.round)(r2, 2).frenchify()],
60
+ ])}
61
+
62
+ Enfin, on obtient $r$ en prenant la racine carrée du résultat précédent :
63
+
64
+ ${(0, alignTex_1.alignTex)([
65
+ ["r", "=", new sqrtNode_1.SqrtNode((0, round_1.round)(r2, 2).toTree()).toTex()],
66
+ ["", "\\approx", getAnswer(identifiers)],
67
+ ])}
68
+ `;
69
+ };
70
+ const getKeys = (identifiers) => {
71
+ return [];
72
+ };
73
+ const isAnswerValid = (ans, { answer, area }) => {
74
+ const parsed = (0, numberParser_1.numberParser)(ans);
75
+ if (!parsed)
76
+ return false;
77
+ return parsed === answer;
78
+ };
79
+ const getCircleRadiusFromAreaQuestion = () => {
80
+ const area = (0, randfloat_1.randfloat)(1, 100, 2);
81
+ const identifiers = { area };
82
+ const question = {
83
+ answer: getAnswer(identifiers),
84
+ instruction: getInstruction(identifiers),
85
+ keys: getKeys(identifiers),
86
+ answerFormat: "tex",
87
+ identifiers,
88
+ hint: getHint(identifiers),
89
+ correction: getCorrection(identifiers),
90
+ };
91
+ return question;
92
+ };
93
+ exports.circleRadiusFromArea = {
94
+ id: "circleRadiusFromArea",
95
+ connector: "=",
96
+ label: "Calculer le rayon d'un cercle en connaissant son aire",
97
+ isSingleStep: true,
98
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getCircleRadiusFromAreaQuestion, nb),
99
+ qcmTimer: 60,
100
+ freeTimer: 60,
101
+ getPropositions,
102
+ isAnswerValid,
103
+ subject: "Mathématiques",
104
+ getHint,
105
+ getCorrection,
106
+ getAnswer,
107
+ hasHintAndCorrection: true,
108
+ };
@@ -4,4 +4,7 @@ export * from "./rightTriangleArea";
4
4
  export * from "./squareArea";
5
5
  export * from "./triangleArea";
6
6
  export * from "./triangleAreaV2";
7
+ export * from "./squareSideFromArea";
8
+ export * from "./rectangleSideFromArea";
9
+ export * from "./circleRadiusFromArea";
7
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC"}
@@ -20,3 +20,6 @@ __exportStar(require("./rightTriangleArea"), exports);
20
20
  __exportStar(require("./squareArea"), exports);
21
21
  __exportStar(require("./triangleArea"), exports);
22
22
  __exportStar(require("./triangleAreaV2"), exports);
23
+ __exportStar(require("./squareSideFromArea"), exports);
24
+ __exportStar(require("./rectangleSideFromArea"), exports);
25
+ __exportStar(require("./circleRadiusFromArea"), exports);
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ area: number;
4
+ width: number;
5
+ };
6
+ export declare const rectangleSideFromArea: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=rectangleSideFromArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rectangleSideFromArea.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/geometry/areas/rectangleSideFromArea.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAcT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAoFF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,WAAW,CAiBvD,CAAC"}
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rectangleSideFromArea = void 0;
4
+ const exercise_1 = require("../../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../../exercises/utils/getDistinctQuestions");
6
+ const randfloat_1 = require("../../../../math/utils/random/randfloat");
7
+ const round_1 = require("../../../../math/utils/round");
8
+ const fractionNode_1 = require("../../../../tree/nodes/operators/fractionNode");
9
+ const numberParser_1 = require("../../../../tree/parsers/numberParser");
10
+ const alignTex_1 = require("../../../../utils/latex/alignTex");
11
+ const getPropositions = (n, { answer, area, width }) => {
12
+ const propositions = [];
13
+ (0, exercise_1.addValidProp)(propositions, answer);
14
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(area / 4, 3).frenchify());
15
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)(area - width, 3).frenchify());
16
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, round_1.round)((area - 2 * width) / 2, 3).frenchify());
17
+ while (propositions.length < n) {
18
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(1, 100, 2).frenchify());
19
+ }
20
+ return (0, exercise_1.shuffleProps)(propositions, n);
21
+ };
22
+ const getAnswer = (identifiers) => {
23
+ return (0, round_1.round)(identifiers.area / identifiers.width, 2).frenchify();
24
+ };
25
+ const getInstruction = (identifiers) => {
26
+ return `Calculer la longueur d'un rectangle d'aire $${identifiers.area.frenchify()}$ et de largeur $${identifiers.width.frenchify()}$.`;
27
+ };
28
+ const getHint = (identifiers) => {
29
+ return `L'aire d'un rectangle est le produit de la largeur et de la longueur.`;
30
+ };
31
+ const getCorrection = (identifiers) => {
32
+ return `L'aire d'un rectangle est le produit de la largeur et de la longueur.
33
+
34
+ Ici, on a donc :
35
+
36
+ $$
37
+ ${identifiers.area.frenchify()} = ${identifiers.width.frenchify()}\\times L
38
+ $$
39
+
40
+ Pour retrouver la longueur, on isole $L$ dans cette équation. On obtient :
41
+
42
+ ${(0, alignTex_1.alignTex)([
43
+ [
44
+ "L",
45
+ "=",
46
+ `${new fractionNode_1.FractionNode(identifiers.area.toTree(), identifiers.width.toTree()).toTex()}`,
47
+ ],
48
+ ["", "=", getAnswer(identifiers)],
49
+ ])}
50
+ `;
51
+ };
52
+ const getKeys = (identifiers) => {
53
+ return [];
54
+ };
55
+ const isAnswerValid = (ans, { answer, area, width }) => {
56
+ const parsed = (0, numberParser_1.numberParser)(ans);
57
+ if (!parsed)
58
+ return false;
59
+ return parsed === answer;
60
+ };
61
+ const getRectangleSideFromAreaQuestion = () => {
62
+ const width = (0, randfloat_1.randfloat)(1, 50, 1);
63
+ const length = (0, randfloat_1.randfloat)(width + 1, width + 30, 1);
64
+ const area = (0, round_1.round)(width * length, 5);
65
+ const identifiers = {
66
+ area,
67
+ width,
68
+ };
69
+ const question = {
70
+ answer: getAnswer(identifiers),
71
+ instruction: getInstruction(identifiers),
72
+ keys: getKeys(identifiers),
73
+ answerFormat: "tex",
74
+ identifiers,
75
+ hint: getHint(identifiers),
76
+ correction: getCorrection(identifiers),
77
+ };
78
+ return question;
79
+ };
80
+ exports.rectangleSideFromArea = {
81
+ id: "rectangleSideFromArea",
82
+ connector: "=",
83
+ label: "Calculer la longueur d'un rectangle en connaissant son aire et sa largeur",
84
+ isSingleStep: true,
85
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getRectangleSideFromAreaQuestion, nb),
86
+ qcmTimer: 60,
87
+ freeTimer: 60,
88
+ getPropositions,
89
+ isAnswerValid,
90
+ subject: "Mathématiques",
91
+ getHint,
92
+ getCorrection,
93
+ getAnswer,
94
+ hasHintAndCorrection: true,
95
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../../exercises/exercise";
2
+ type Identifiers = {
3
+ area: number;
4
+ isPerfectSquare: boolean;
5
+ };
6
+ export declare const squareSideFromArea: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=squareSideFromArea.d.ts.map