math-exercises 2.1.26-beta.1 → 2.1.26-beta.11

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 (68) hide show
  1. package/lib/exercises/exercise.d.ts +3 -1
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calcul/arithmetics/paritySumsAndProducts.js +1 -1
  4. package/lib/exercises/math/calculLitteral/equation/binomialsTrinomialsProposedSolutions.js +1 -1
  5. package/lib/exercises/math/calculLitteral/systems/verifySystemSolution.js +1 -1
  6. package/lib/exercises/math/derivation/derivative/convexityQuadrinomials.js +1 -1
  7. package/lib/exercises/math/derivation/derivative/convexityTrinomials.js +1 -1
  8. package/lib/exercises/math/equaDiff/equaDiffCheckSolutionFirstOrder.js +1 -1
  9. package/lib/exercises/math/functions/affines/affineAdjustmentComplete.js +1 -1
  10. package/lib/exercises/math/functions/affines/affineExpressionReading.js +1 -1
  11. package/lib/exercises/math/functions/parity/parityFromAlgebra.js +1 -1
  12. package/lib/exercises/math/functions/parity/parityFromGraph.js +1 -1
  13. package/lib/exercises/math/functions/trinoms/extremumTypeFromAlgebricForm.js +1 -1
  14. package/lib/exercises/math/functions/trinoms/variationsFromAlgebricForm.js +1 -1
  15. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.d.ts.map +1 -1
  16. package/lib/exercises/math/geometry/cartesian/drawAlineInGGB.js +11 -7
  17. package/lib/exercises/math/geometry/cartesian/placeAPoint.d.ts.map +1 -1
  18. package/lib/exercises/math/geometry/cartesian/placeAPoint.js +2 -2
  19. package/lib/exercises/math/geometry/convexity/convexityTrinomialsGeo.js +1 -1
  20. package/lib/exercises/math/geometry/vectors/alignementViaColinearity.js +1 -1
  21. package/lib/exercises/math/geometry/vectors/colinearity.js +1 -1
  22. package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.d.ts +4 -1
  23. package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.d.ts.map +1 -1
  24. package/lib/exercises/math/geometry/vectors/drawAVectorInGGB.js +13 -4
  25. package/lib/exercises/math/geometry/vectors/equalCaracteristicFromGraph.js +1 -1
  26. package/lib/exercises/math/geometry/vectors/paralellismViaColinearity.js +1 -1
  27. package/lib/exercises/math/geometry/vectors/parallelogramViaEqualVectors.js +1 -1
  28. package/lib/exercises/math/matrices/matrixGeneralTerm.js +1 -1
  29. package/lib/exercises/math/percent/isTableProportional.js +1 -1
  30. package/lib/exercises/math/probaStat/independancy.js +1 -1
  31. package/lib/exercises/math/probaStat/stats2var/fineAdjustementExercise.js +1 -1
  32. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromFirstTerms.js +1 -1
  33. package/lib/exercises/math/sequences/arithmetic/recognizeArithmeticFromGraph.js +1 -1
  34. package/lib/exercises/math/sequences/genericSequenceVariations.js +1 -1
  35. package/lib/exercises/pc/calibrationCurveOfSolution.d.ts.map +1 -1
  36. package/lib/exercises/pc/calibrationCurveOfSolution.js +33 -16
  37. package/lib/exercises/pc/chemicalElements/atomicStructureOfNucleus.js +1 -1
  38. package/lib/exercises/pc/chemicalElements/identifyRightElectronicConfiguration.js +1 -1
  39. package/lib/exercises/pc/chemicalReactions/identifyLimitingReagent.js +1 -1
  40. package/lib/exercises/pc/chemicalReactions/identifyStoichiometricMixture.js +1 -1
  41. package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts +12 -0
  42. package/lib/exercises/pc/dosage/beerLambertRandomValue.d.ts.map +1 -0
  43. package/lib/exercises/pc/dosage/beerLambertRandomValue.js +163 -0
  44. package/lib/exercises/pc/dosage/index.d.ts +2 -0
  45. package/lib/exercises/pc/dosage/index.d.ts.map +1 -0
  46. package/lib/exercises/pc/dosage/index.js +17 -0
  47. package/lib/exercises/pc/index.d.ts +2 -0
  48. package/lib/exercises/pc/index.d.ts.map +1 -1
  49. package/lib/exercises/pc/index.js +2 -0
  50. package/lib/exercises/pc/mole/concentrationReading.js +1 -1
  51. package/lib/exercises/pc/moleculeNomenclature.js +1 -1
  52. package/lib/exercises/pc/sound/frequencyComparison.js +1 -1
  53. package/lib/exercises/pc/spectral/index.d.ts +2 -0
  54. package/lib/exercises/pc/spectral/index.d.ts.map +1 -0
  55. package/lib/exercises/pc/spectral/index.js +17 -0
  56. package/lib/exercises/pc/spectral/spectralEnergy.d.ts +10 -0
  57. package/lib/exercises/pc/spectral/spectralEnergy.d.ts.map +1 -0
  58. package/lib/exercises/pc/spectral/spectralEnergy.js +129 -0
  59. package/lib/exercises/utils/geogebra/getPointFromGGB.js +1 -1
  60. package/lib/exercises/utils/geogebra/isGGBLine.js +1 -1
  61. package/lib/exercises/utils/geogebra/isGGBPoint.js +1 -1
  62. package/lib/index.d.ts +15 -1
  63. package/lib/index.d.ts.map +1 -1
  64. package/lib/pc/constants/quantic.d.ts +9 -0
  65. package/lib/pc/constants/quantic.d.ts.map +1 -0
  66. package/lib/pc/constants/quantic.js +14 -0
  67. package/lib/server.js +6 -10
  68. package/package.json +1 -1
@@ -33,7 +33,7 @@ export interface Question<TIdentifiers = {}> {
33
33
  };
34
34
  studentGgbOptions?: {
35
35
  customToolBar?: string;
36
- gridDistance?: [number, number] | false;
36
+ gridDistance?: [number, number];
37
37
  hideGrid?: boolean;
38
38
  hideAxes?: boolean;
39
39
  isGridBold?: boolean;
@@ -45,6 +45,7 @@ export interface Question<TIdentifiers = {}> {
45
45
  enableShiftDragZoom?: boolean;
46
46
  coords?: number[];
47
47
  initialCommands?: string[];
48
+ axisLabels?: string[];
48
49
  };
49
50
  style?: {
50
51
  tableHasNoHeader?: boolean;
@@ -74,6 +75,7 @@ export interface Exercise<TIdentifiers = {}> {
74
75
  answerType?: "GGB" | "QCM" | "free" | "QCU";
75
76
  qcmTimer: number;
76
77
  freeTimer: number;
78
+ ggbTimer?: number;
77
79
  getPropositions?: QCMGenerator<{
78
80
  answer: string;
79
81
  } & TIdentifiers>;
@@ -1 +1 @@
1
- {"version":3,"file":"exercise.d.ts","sourceRoot":"","sources":["../../src/exercises/exercise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,GACN,MAAM,GACN,SAAS,GACT,QAAQ,GACR,QAAQ,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,oBAAoB,GACpB,WAAW,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,E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,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: "QCM",
112
+ answerType: "QCU",
113
113
  maxAllowedQuestions: 12,
114
114
  getPropositions,
115
115
  subject: "Mathématiques",
@@ -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: "QCM",
72
+ answerType: "QCU",
73
73
  qcmTimer: 60,
74
74
  freeTimer: 60,
75
75
  getPropositions,
@@ -59,5 +59,5 @@ exports.verifySystemSolution = {
59
59
  getPropositions,
60
60
  isAnswerValid,
61
61
  subject: "Mathématiques",
62
- answerType: "QCM",
62
+ answerType: "QCU",
63
63
  };
@@ -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: "QCM",
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: "QCM",
40
+ answerType: "QCU",
41
41
  getPropositions,
42
42
  isAnswerValid,
43
43
  subject: "Mathématiques",
@@ -97,6 +97,6 @@ exports.equaDiffCheckSolutionFirstOrder = {
97
97
  freeTimer: 60,
98
98
  getPropositions,
99
99
  isAnswerValid,
100
- answerType: "QCM",
100
+ answerType: "QCU",
101
101
  subject: "Mathématiques",
102
102
  };
@@ -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: "QCM",
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((0, ${b}), (${secondPoint[0]}, ${secondPoint[1]}))`,
28
+ `l = Line[(0, ${b}), (${secondPoint[0]}, ${secondPoint[1]})]`,
29
29
  `SetColor(l, "${(0, colors_1.randomColor)()}")`,
30
30
  "SetFixed(l, true)",
31
31
  ];
@@ -113,6 +113,6 @@ exports.parityFromAlgebra = {
113
113
  freeTimer: 60,
114
114
  getPropositions,
115
115
  isAnswerValid,
116
- answerType: "QCM",
116
+ answerType: "QCU",
117
117
  subject: "Mathématiques",
118
118
  };
@@ -123,7 +123,7 @@ exports.parityFromGraph = {
123
123
  freeTimer: 60,
124
124
  getPropositions,
125
125
  isAnswerValid,
126
- answerType: "QCM",
126
+ answerType: "QCU",
127
127
  hasGeogebra: true,
128
128
  subject: "Mathématiques",
129
129
  };
@@ -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: "QCM",
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: "QCM",
40
+ answerType: "QCU",
41
41
  qcmTimer: 60,
42
42
  freeTimer: 60,
43
43
  getPropositions,
@@ -1 +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;AAmDF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,WAAW,CAahD,CAAC"}
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"}
@@ -15,7 +15,7 @@ const getDrawAlineInGgbQuestion = () => {
15
15
  const yMax = Math.max(yA, yB, 0);
16
16
  const yMin = Math.min(yA, yB, 0);
17
17
  const question = {
18
- ggbAnswer: [`(0;${yA})`, `(1;${yB})`, `Line(A, B)`],
18
+ ggbAnswer: [`(0,${yA})`, `(1,${yB})`, `Line[A, B]`],
19
19
  instruction: `Tracer la droite $d$ d'équation $y=${f.toTex()}$.`,
20
20
  keys: [],
21
21
  answerFormat: "tex",
@@ -33,20 +33,24 @@ const getDrawAlineInGgbQuestion = () => {
33
33
  return question;
34
34
  };
35
35
  const isGGBAnswerValid = (ans, { ggbAnswer, correctA, correctB }) => {
36
- if ((0, arrayEqual_1.arrayEqual)(ans, ggbAnswer))
36
+ const studentAnswer = ans.map((s) => s.split("=")[1]);
37
+ console.log(studentAnswer);
38
+ if ((0, arrayEqual_1.arrayEqual)(studentAnswer, ggbAnswer))
37
39
  return true;
38
- if (ans.length !== 3)
40
+ if (studentAnswer.length !== 3)
39
41
  return false;
40
- if (!(0, isGGBPoint_1.isGGBPoint)(ans[0]) || !(0, isGGBPoint_1.isGGBPoint)(ans[1]) || !(0, isGGBLine_1.isGGBLine)(ans[2]))
42
+ if (!(0, isGGBPoint_1.isGGBPoint)(studentAnswer[0]) ||
43
+ !(0, isGGBPoint_1.isGGBPoint)(studentAnswer[1]) ||
44
+ !(0, isGGBLine_1.isGGBLine)(studentAnswer[2]))
41
45
  return false;
42
- const A = getPoint(ans[0], "A");
43
- const B = getPoint(ans[1], "B");
46
+ const A = getPoint(studentAnswer[0], "A");
47
+ const B = getPoint(studentAnswer[1], "B");
44
48
  const a = (B.getYnumber() - A.getYnumber()) / (B.getXnumber() - A.getXnumber());
45
49
  const b = A.getYnumber() - a * A.getXnumber();
46
50
  return a === correctA && b === correctB;
47
51
  };
48
52
  const getPoint = (command, pointName) => {
49
- const splitted = command.split(";");
53
+ const splitted = command.split(",");
50
54
  const x = +splitted[0].replace("(", "");
51
55
  const y = +splitted[1].replace(")", "");
52
56
  return new point_1.Point(pointName, x.toTree(), y.toTree());
@@ -1 +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;AAgCtB,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,WAAW,CAY/C,CAAC"}
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"}
@@ -12,7 +12,7 @@ const getPlaceAPointQuestion = () => {
12
12
  const yMin = point.getYnumber() - 2;
13
13
  const yMax = point.getYnumber() + 2;
14
14
  const question = {
15
- ggbAnswer: [`(${point.getXnumber()};${point.getYnumber()})`],
15
+ ggbAnswer: [`(${point.getXnumber()},${point.getYnumber()})`],
16
16
  instruction: `Placer le point $A$ de coordonnées $${point.toTexWithCoords()}$.`,
17
17
  keys: [],
18
18
  studentGgbOptions: {
@@ -29,7 +29,7 @@ const getPlaceAPointQuestion = () => {
29
29
  return question;
30
30
  };
31
31
  const isGGBAnswerValid = (ans, { ggbAnswer }) => {
32
- return (0, arrayHasSameElement_1.arrayHasSameElements)(ans, ggbAnswer);
32
+ return (0, arrayHasSameElement_1.arrayHasSameElements)(ans.map((s) => s.split("=")[1]), ggbAnswer);
33
33
  };
34
34
  exports.testGGBAnswer = {
35
35
  id: "placeAPoint",
@@ -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: "QCM",
58
+ answerType: "QCU",
59
59
  getPropositions,
60
60
  isAnswerValid,
61
61
  hasGeogebra: true,
@@ -60,6 +60,6 @@ exports.alignementViaColinearity = {
60
60
  qcmTimer: 60,
61
61
  freeTimer: 60,
62
62
  getPropositions,
63
- answerType: "QCM",
63
+ answerType: "QCU",
64
64
  subject: "Mathématiques",
65
65
  };
@@ -55,6 +55,6 @@ exports.colinearity = {
55
55
  qcmTimer: 60,
56
56
  freeTimer: 60,
57
57
  getPropositions,
58
- answerType: "QCM",
58
+ answerType: "QCU",
59
59
  subject: "Mathématiques",
60
60
  };
@@ -1,5 +1,8 @@
1
1
  import { Exercise } from "../../../../exercises/exercise";
2
- type Identifiers = {};
2
+ type Identifiers = {
3
+ x: number;
4
+ y: number;
5
+ };
3
6
  export declare const drawAVectorInGGB: Exercise<Identifiers>;
4
7
  export {};
5
8
  //# sourceMappingURL=drawAVectorInGGB.d.ts.map
@@ -1 +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,EAAE,CAAC;AA8BtB,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
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;AAsCF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,WAAW,CAalD,CAAC"}
@@ -10,7 +10,7 @@ const getDrawAVectorInGgbQuestion = () => {
10
10
  const y = x === 0 ? (0, randint_1.randint)(-3, 3, [0]) : (0, randint_1.randint)(-3, 3);
11
11
  const vector = new vector_1.Vector("u", x.toTree(), y.toTree());
12
12
  const question = {
13
- ggbAnswer: [``, ``, `(${x};${y})`],
13
+ ggbAnswer: [`Vector((-2, -2), (${-2 + x}, ${-2 + y}))`],
14
14
  instruction: `Tracer le vecteur $${vector.toTex()}${vector.toInlineCoordsTex()}$`,
15
15
  keys: [],
16
16
  studentGgbOptions: {
@@ -22,12 +22,21 @@ const getDrawAVectorInGgbQuestion = () => {
22
22
  enableShiftDragZoom: true,
23
23
  },
24
24
  answerFormat: "tex",
25
- identifiers: {},
25
+ identifiers: { x, y },
26
26
  };
27
27
  return question;
28
28
  };
29
- const isGGBAnswerValid = (ans, { ggbAnswer }) => {
30
- return ans.length === 3 && ans.includes(ggbAnswer[2]);
29
+ const isGGBAnswerValid = (ans, { ggbAnswer, x, y }) => {
30
+ const vector = ans.find((s) => !!s.match(/[a-z]=/)?.length);
31
+ if (!vector)
32
+ return false;
33
+ const coords = vector
34
+ .substring(vector.indexOf("=") + 1)
35
+ .replaceAll("(", "")
36
+ .replaceAll(")", "")
37
+ .split(",");
38
+ console.log(coords);
39
+ return Number(coords[0]) === x && Number(coords[1]) === y;
31
40
  };
32
41
  exports.drawAVectorInGGB = {
33
42
  id: "drawAVectorInGGB",
@@ -190,7 +190,7 @@ exports.equalCaracteristicFromGraph = {
190
190
  freeTimer: 60,
191
191
  getPropositions,
192
192
  isAnswerValid,
193
- answerType: "QCM",
193
+ answerType: "QCU",
194
194
  hasGeogebra: true,
195
195
  subject: "Mathématiques",
196
196
  };
@@ -71,6 +71,6 @@ exports.paralellismViaColinearity = {
71
71
  qcmTimer: 60,
72
72
  freeTimer: 60,
73
73
  getPropositions,
74
- answerType: "QCM",
74
+ answerType: "QCU",
75
75
  subject: "Mathématiques",
76
76
  };
@@ -63,6 +63,6 @@ exports.parallelogramViaEqualVectors = {
63
63
  qcmTimer: 60,
64
64
  freeTimer: 60,
65
65
  getPropositions,
66
- answerType: "QCM",
66
+ answerType: "QCU",
67
67
  subject: "Mathématiques",
68
68
  };
@@ -53,6 +53,6 @@ exports.matrixGeneralTerm = {
53
53
  freeTimer: 60,
54
54
  getPropositions,
55
55
  isAnswerValid,
56
- answerType: "QCM",
56
+ answerType: "QCU",
57
57
  subject: "Mathématiques",
58
58
  };
@@ -68,6 +68,6 @@ exports.isTableProportional = {
68
68
  freeTimer: 60,
69
69
  getPropositions,
70
70
  isAnswerValid,
71
- answerType: "QCM",
71
+ answerType: "QCU",
72
72
  subject: "Mathématiques",
73
73
  };
@@ -55,6 +55,6 @@ exports.independancy = {
55
55
  qcmTimer: 60,
56
56
  freeTimer: 60,
57
57
  getPropositions,
58
- answerType: "QCM",
58
+ answerType: "QCU",
59
59
  subject: "Mathématiques",
60
60
  };
@@ -97,7 +97,7 @@ exports.fineAdjustementExercise = {
97
97
  levels: ["TermSpé"],
98
98
  isSingleStep: true,
99
99
  hasGeogebra: true,
100
- answerType: "QCM",
100
+ answerType: "QCU",
101
101
  sections: ["Statistiques"],
102
102
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getFineAdjustementExerciseQuestion, nb),
103
103
  qcmTimer: 60,
@@ -67,6 +67,6 @@ exports.recognizeArithmeticFromFirstTerms = {
67
67
  freeTimer: 60,
68
68
  getPropositions,
69
69
  isAnswerValid,
70
- answerType: "QCM",
70
+ answerType: "QCU",
71
71
  subject: "Mathématiques",
72
72
  };
@@ -86,7 +86,7 @@ exports.recognizeArithmeticFromGraph = {
86
86
  freeTimer: 60,
87
87
  getPropositions,
88
88
  isAnswerValid,
89
- answerType: "QCM",
89
+ answerType: "QCU",
90
90
  hasGeogebra: true,
91
91
  subject: "Mathématiques",
92
92
  };
@@ -47,7 +47,7 @@ exports.genericSequenceVariations = {
47
47
  generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getGenericSequenceVariationsQuestion, nb),
48
48
  qcmTimer: 60,
49
49
  freeTimer: 60,
50
- answerType: "QCM",
50
+ answerType: "QCU",
51
51
  getPropositions,
52
52
  subject: "Mathématiques",
53
53
  };
@@ -1 +1 @@
1
- {"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAUlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAoEF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
1
+ {"version":3,"file":"calibrationCurveOfSolution.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/calibrationCurveOfSolution.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAUT,MAAM,0BAA0B,CAAC;AAWlC,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAuFF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,WAAW,CAa5D,CAAC"}
@@ -9,28 +9,30 @@ const random_1 = require("../../utils/random");
9
9
  const requiresApostropheBefore_1 = require("../../utils/requiresApostropheBefore");
10
10
  const getPointFromGGB_1 = require("../utils/geogebra/getPointFromGGB");
11
11
  const isGGBPoint_1 = require("../utils/geogebra/isGGBPoint");
12
+ const toolBarConstructor_1 = require("../utils/geogebra/toolBarConstructor");
12
13
  const getCalibrationCurveOfSolutionQuestion = () => {
13
14
  const exo = generateExercise();
15
+ const minY = 5 * exo.epsilon * exo.l - 10;
16
+ const maxY = 10 * exo.epsilon * exo.l + 5;
14
17
  const question = {
15
18
  ggbAnswer: [
16
- `(1;${exo.epsilon * exo.l})`,
17
- `(2;${2 * exo.epsilon * exo.l})`,
19
+ `(5,${5 * exo.epsilon * exo.l})`,
20
+ `(10,${10 * exo.epsilon * exo.l})`,
18
21
  `Line(A, B)`,
19
22
  ],
20
23
  instruction: exo.instruction,
21
24
  keys: [],
22
25
  studentGgbOptions: {
23
- coords: [10, 20, -2, 20],
24
- isXAxesNatural: true,
25
- initialCommands: [
26
- `Text("\\tiny{[Xi]}",(29,4),true,true)`,
27
- `Text("\\tiny{A}",(1,20),true,true)`,
28
- ],
26
+ coords: [-1, 5, -1, 6],
27
+ isAxesRatioFixed: false,
28
+ enableShiftDragZoom: true,
29
+ axisLabels: ["$\\small{C}$", "$\\small{A}$"],
30
+ customToolBar: (0, toolBarConstructor_1.toolBarConstructor)({
31
+ join: true,
32
+ }),
29
33
  },
30
- hint: `Utilier la formule $a=c\\cdot l\\cdot ε$`,
31
- correction: `1 - Choisir deux coordonnées $x_1$ et $x_2$. \n \\
32
- 2 - Calculer $a_1 = x_1\\cdot l \\cdotε$ et $a_2 = x_2\\cdot l \\cdotε$. \n \\
33
- 3 - Tracer la droite qui passe par les deux points $(x_1,a_1)$ $(x_2,a_2)$.`,
34
+ hint: exo.hint,
35
+ correction: exo.correction,
34
36
  identifiers: {
35
37
  epsilon: exo.epsilon,
36
38
  l: exo.l,
@@ -39,11 +41,12 @@ const getCalibrationCurveOfSolutionQuestion = () => {
39
41
  return question;
40
42
  };
41
43
  const isGGBAnswerValid = (ans, { ggbAnswer, epsilon, l }) => {
42
- if ((0, arrayEqual_1.arrayEqual)(ans, ggbAnswer))
44
+ const studentAnswer = ans.map((s) => s.split("=")[1]);
45
+ if ((0, arrayEqual_1.arrayEqual)(studentAnswer, ggbAnswer))
43
46
  return true;
44
- const points = ans
47
+ const points = studentAnswer
45
48
  .filter((command) => (0, isGGBPoint_1.isGGBPoint)(command))
46
- .map((value) => (0, getPointFromGGB_1.getPointFromGGB)(value, ""));
49
+ .map((value) => (0, getPointFromGGB_1.getPointFromGGB)(value, "", false));
47
50
  return (points.length !== 0 &&
48
51
  points.every((value) => value.getXnumber() * epsilon * l === value.getYnumber()));
49
52
  };
@@ -52,14 +55,28 @@ const generateExercise = () => {
52
55
  const epsilon = (0, randint_1.randint)(1, 3);
53
56
  const l = (0, randint_1.randint)(1, 3);
54
57
  const instruction = `Dans un laboratoire, vous avez effectué l'étalonnage d'une solution ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(molecule.name) ? "d'" : "de "}${molecule.name}. \n
55
- Vous disposez du coefficient d'extinction molaire $ε$ de $${epsilon}$ $L/(mol·cm)$ et de la longueur de la cuve $l$ de $${l}$ $cm$. \n
58
+ Vous disposez du coefficient d'extinction molaire $ε$ de $${epsilon}$ $\\text{L}\\cdot\\text{mol}^{-1}\\cdot\\text{cm}^{-1}$ et de la longueur de la cuve $l$ de $${l}$ $\\text{cm}$. \n
56
59
  Tracer la courbe d'étalonnage de cette solution.`;
57
60
  return {
58
61
  instruction,
62
+ hint: getHint(),
63
+ correction: getCorrection(),
59
64
  epsilon,
60
65
  l,
61
66
  };
62
67
  };
68
+ const getCorrection = () => {
69
+ return `1 - Choisir deux coordonnées $x_1$ et $x_2$. \n \\
70
+ 2 - Calculer $A_1 = x_1\\cdot l \\cdotε$ et $A_2 = x_2\\cdot l \\cdotε$. \n \\
71
+ 3 - Tracer la droite qui passe par les deux points $(x_1,A_1)$ et $(x_2,A_2)$.`;
72
+ };
73
+ const getHint = () => {
74
+ return `Utiliser la formule $A=C\\cdot \\ell\\cdot ε$, où :\n
75
+ - $A$ est l'absorbance (une grandeur sans unité)\n
76
+ - $ε$ est le coefficient d'extinction molaire (ou coefficient d'absorption molaire) en $\\text{L}\\cdot\\text{mol}^{-1}\\cdot\\text{cm}^{-1}$\n
77
+ - $C$ est la concentration de la solution en $\\text{mol}\\cdot\\text{L}^{-1}$\n
78
+ - $\\ell$ est la longueur du chemin optique en centimètres $(\\text{cm})$`;
79
+ };
63
80
  exports.calibrationCurveOfSolution = {
64
81
  id: "calibrationCurveOfSolution",
65
82
  label: "Tracer une courbe d'étalonnage",
@@ -54,5 +54,5 @@ exports.atomicStructureOfNucleus = {
54
54
  getPropositions,
55
55
  isAnswerValid,
56
56
  subject: "Chimie",
57
- answerType: "QCM",
57
+ answerType: "QCU",
58
58
  };
@@ -96,6 +96,6 @@ exports.identifyRightElectronicConfiguration = {
96
96
  getPropositions,
97
97
  isAnswerValid,
98
98
  subject: "Chimie",
99
- answerType: "QCM",
99
+ answerType: "QCU",
100
100
  maxAllowedQuestions: 16,
101
101
  };
@@ -55,5 +55,5 @@ exports.identifyLimitingReagent = {
55
55
  getPropositions,
56
56
  isAnswerValid,
57
57
  subject: "Chimie",
58
- answerType: "QCM",
58
+ answerType: "QCU",
59
59
  };
@@ -64,5 +64,5 @@ exports.identifyStoichiometricMixture = {
64
64
  getPropositions,
65
65
  isAnswerValid,
66
66
  subject: "Chimie",
67
- answerType: "QCM",
67
+ answerType: "QCU",
68
68
  };
@@ -0,0 +1,12 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ type Identifiers = {
3
+ moleculeName: string;
4
+ concentration: number;
5
+ molarAbsorptivity: number;
6
+ pathLength: number;
7
+ absorbance: number;
8
+ randomIndex: number;
9
+ };
10
+ export declare const BeerLambertRandomValueExercise: Exercise<Identifiers>;
11
+ export {};
12
+ //# sourceMappingURL=beerLambertRandomValue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"beerLambertRandomValue.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/dosage/beerLambertRandomValue.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AASlC,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAmNF,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,WAAW,CAahE,CAAC"}
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BeerLambertRandomValueExercise = 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 round_1 = require("../../../math/utils/round");
8
+ const molecule_1 = require("../../../pc/molecularChemistry/molecule");
9
+ const random_1 = require("../../../utils/random");
10
+ const requiresApostropheBefore_1 = require("../../../utils/requiresApostropheBefore");
11
+ const randfloat_1 = require("../../../math/utils/random/randfloat");
12
+ const randint_1 = require("../../../math/utils/random/randint");
13
+ const getBeerLambertRandomValueQuestion = () => {
14
+ const molecule = (0, random_1.random)(molecule_1.molecules);
15
+ const concentration = (0, round_1.round)((0, randfloat_1.randfloat)(0.01, 0.1), 2); // Concentration in mol/L
16
+ const molarAbsorptivity = (0, round_1.round)((0, randfloat_1.randfloat)(10, 100), 1); // Molar absorptivity in L·mol^-1·cm^-1
17
+ const pathLength = (0, round_1.round)((0, randfloat_1.randfloat)(1, 5), 1); // Path length in cm
18
+ const absorbance = (0, round_1.round)(concentration * molarAbsorptivity * pathLength, 2); // Absorbance
19
+ const variables = [
20
+ {
21
+ name: "concentration",
22
+ value: concentration,
23
+ unit: "\\text{mol} \\cdot \\text{L}^{-1}",
24
+ },
25
+ {
26
+ name: "molarAbsorptivity",
27
+ value: molarAbsorptivity,
28
+ unit: "\\text{L} \\cdot \\text{mol}^{-1} \\cdot \\text{cm}^{-1}",
29
+ },
30
+ { name: "pathLength", value: pathLength, unit: "\\text{cm}" },
31
+ { name: "absorbance", value: absorbance, unit: "" },
32
+ ];
33
+ const randomIndex = (0, randint_1.randint)(0, variables.length);
34
+ const targetVariable = variables[randomIndex];
35
+ const knownVariables = variables.filter((_, index) => index !== randomIndex);
36
+ const knownVariablesText = knownVariables
37
+ .map((v) => `${v.name === "concentration"
38
+ ? "- Concentration"
39
+ : v.name === "molarAbsorptivity"
40
+ ? "- Coefficient d'absorption molaire"
41
+ : v.name === "pathLength"
42
+ ? "- Longueur du trajet optique"
43
+ : "- Absorbance"} : ${v.name === "concentration"
44
+ ? "$C$"
45
+ : v.name === "molarAbsorptivity"
46
+ ? "$\\varepsilon$"
47
+ : v.name === "pathLength"
48
+ ? "$\\ell$"
49
+ : "$A$"} = $${(0, frenchify_1.frenchify)(v.value)}\\ ${v.unit}$`)
50
+ .join(",\n");
51
+ const instruction = `Vous êtes en train de réaliser l'étalonnage d'une solution ${(0, requiresApostropheBefore_1.requiresApostropheBefore)(molecule.name.toLowerCase()) ? "d'" : "de "}${molecule.name.toLowerCase()} en utilisant une solution étalon. Vous avez mesuré les données suivantes :\n
52
+ ${knownVariablesText}.\n
53
+
54
+ À partir de ces données, déterminez ${targetVariable.name === "concentration"
55
+ ? "la concentration en $\\text{mol} \\cdot \\text{L}^{-1}$"
56
+ : targetVariable.name === "molarAbsorptivity"
57
+ ? "le coefficient d'absorption molaire en $\\text{L} \\cdot \\text{mol}^{-1} \\cdot \\text{cm}^{-1}$"
58
+ : targetVariable.name === "pathLength"
59
+ ? "la longueur du trajet optique en $\\text{cm}$"
60
+ : "l'absorbance"} de cette solution.`;
61
+ const hint = `Rappelez-vous la loi de Beer-Lambert : $A = \\varepsilon \\cdot C \\cdot \\ell$. Voici les éléments de cette formule :
62
+ - $A$ : l'absorbance
63
+ - $\\varepsilon$ : le coefficient d'absorption molaire en $\\text{L} \\cdot \\text{mol}^{-1} \\cdot \\text{cm}^{-1}$
64
+ - $C$ : la concentration en $\\text{mol} \\cdot \\text{L}^{-1}$
65
+ - $\\ell$ : la longueur du trajet optique en $\\text{cm}$
66
+
67
+ Réorganisez cette formule pour isoler la variable à trouver.`;
68
+ const correction = `La loi de Beer-Lambert est donnée par :
69
+ $$A = \\varepsilon \\cdot \\ell \\cdot C$$
70
+
71
+ Pour résoudre le problème, nous devons réorganiser la formule pour isoler la variable inconnue. En utilisant les valeurs fournies pour $\\varepsilon$, $C$, et $\\ell$, nous pouvons résoudre pour trouver la variable manquante.
72
+
73
+ Si $A$ est l'absorbance, $\\varepsilon$ est le coefficient d'absorption molaire, $C$ est la concentration et $\\ell$ est la longueur du trajet optique, alors:
74
+
75
+ ${targetVariable.name === "concentration"
76
+ ? "$$C = \\frac{A}{\\varepsilon \\cdot \\ell}$$"
77
+ : ""}
78
+ ${targetVariable.name === "molarAbsorptivity"
79
+ ? "$$\\varepsilon = \\frac{A}{C \\cdot \\ell}$$"
80
+ : ""}
81
+ ${targetVariable.name === "pathLength"
82
+ ? "$$\\ell = \\frac{A}{\\varepsilon \\cdot C}$$"
83
+ : ""}
84
+ ${targetVariable.name === "absorbance"
85
+ ? "$$A = \\varepsilon \\cdot C \\cdot \\ell$$"
86
+ : ""}
87
+
88
+ En appliquant les valeurs:
89
+
90
+ ${targetVariable.name === "concentration"
91
+ ? `$$C = \\frac{${(0, frenchify_1.frenchify)(absorbance)}}{${(0, frenchify_1.frenchify)(molarAbsorptivity)} \\cdot ${(0, frenchify_1.frenchify)(pathLength)}} = ${(0, frenchify_1.frenchify)((0, round_1.round)(absorbance / (molarAbsorptivity * pathLength), 2))}\\ \\text{mol} \\cdot \\text{L}^{-1}$$`
92
+ : ""}
93
+ ${targetVariable.name === "molarAbsorptivity"
94
+ ? `$$\\varepsilon = \\frac{${(0, frenchify_1.frenchify)(absorbance)}}{${(0, frenchify_1.frenchify)(concentration)} \\cdot ${(0, frenchify_1.frenchify)(pathLength)}} = ${(0, frenchify_1.frenchify)((0, round_1.round)(absorbance / (concentration * pathLength), 1))}\\ \\text{L} \\cdot \\text{mol}^{-1} \\cdot \\text{cm}^{-1}$$`
95
+ : ""}
96
+ ${targetVariable.name === "pathLength"
97
+ ? `$$\\ell = \\frac{${(0, frenchify_1.frenchify)(absorbance)}}{${(0, frenchify_1.frenchify)(molarAbsorptivity)} \\cdot ${(0, frenchify_1.frenchify)(concentration)}} = ${(0, frenchify_1.frenchify)((0, round_1.round)(absorbance / (molarAbsorptivity * concentration), 1))}\\ \\text{cm}$$`
98
+ : ""}
99
+ ${targetVariable.name === "absorbance"
100
+ ? `$$A = ${(0, frenchify_1.frenchify)(molarAbsorptivity)} \\cdot ${(0, frenchify_1.frenchify)(concentration)} \\cdot ${(0, frenchify_1.frenchify)(pathLength)} = ${(0, frenchify_1.frenchify)(absorbance)}$$`
101
+ : ""}`;
102
+ const question = {
103
+ answer: targetVariable.value.toTree().toTex(),
104
+ instruction,
105
+ hint,
106
+ correction,
107
+ keys: [],
108
+ answerFormat: "tex",
109
+ identifiers: {
110
+ moleculeName: molecule.name.toLowerCase(),
111
+ concentration,
112
+ molarAbsorptivity,
113
+ pathLength,
114
+ absorbance,
115
+ randomIndex,
116
+ },
117
+ };
118
+ return question;
119
+ };
120
+ const getPropositions = (n, { answer, concentration, molarAbsorptivity, pathLength, absorbance }) => {
121
+ const propositions = [];
122
+ (0, exercise_1.addValidProp)(propositions, answer);
123
+ (0, exercise_1.tryToAddWrongProp)(propositions, concentration.toTree().toTex());
124
+ (0, exercise_1.tryToAddWrongProp)(propositions, molarAbsorptivity.toTree().toTex());
125
+ (0, exercise_1.tryToAddWrongProp)(propositions, pathLength.toTree().toTex());
126
+ (0, exercise_1.tryToAddWrongProp)(propositions, absorbance.toTree().toTex());
127
+ while (propositions.length < n) {
128
+ (0, exercise_1.tryToAddWrongProp)(propositions, (0, randfloat_1.randfloat)(0, 10, 2).toTree().toTex());
129
+ }
130
+ return (0, exercise_1.shuffleProps)(propositions, n);
131
+ };
132
+ const isAnswerValid = (ans, { answer, randomIndex, concentration, molarAbsorptivity, pathLength, absorbance, }) => {
133
+ const variables = [
134
+ {
135
+ name: "concentration",
136
+ value: concentration,
137
+ unit: "\\text{mol} \\cdot \\text{L}^{-1}",
138
+ },
139
+ {
140
+ name: "molarAbsorptivity",
141
+ value: molarAbsorptivity,
142
+ unit: "\\text{L} \\cdot \\text{mol}^{-1} \\cdot \\text{cm}^{-1}",
143
+ },
144
+ { name: "pathLength", value: pathLength, unit: "\\text{cm}" },
145
+ { name: "absorbance", value: absorbance, unit: "" },
146
+ ];
147
+ const validAnswer = variables[randomIndex].value;
148
+ const latexs = validAnswer.toTree().toAllValidTexs();
149
+ return latexs.includes(ans);
150
+ };
151
+ exports.BeerLambertRandomValueExercise = {
152
+ id: "beerLambertRandomValue",
153
+ label: "Utiliser la loi de Beer-Lambert",
154
+ levels: ["1reSpé"],
155
+ isSingleStep: true,
156
+ sections: ["Spectrophotométrie"],
157
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getBeerLambertRandomValueQuestion, nb),
158
+ qcmTimer: 60,
159
+ freeTimer: 60,
160
+ getPropositions,
161
+ isAnswerValid,
162
+ subject: "Chimie",
163
+ };
@@ -0,0 +1,2 @@
1
+ export * from "./beerLambertRandomValue";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/dosage/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./beerLambertRandomValue"), exports);
@@ -22,6 +22,8 @@ export * from "./mecanicalWaves";
22
22
  export * from "./fluids";
23
23
  export * from "./electricity";
24
24
  export * from "./calibrationCurveOfSolution";
25
+ export * from "./dosage";
26
+ export * from "./spectral";
25
27
  /**exos pris des maths */
26
28
  export * from "../math/percent/findProportion";
27
29
  export * from "../math/calcul/proportionality/proportionalityTable";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/exercises/pc/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,YAAY,CAAC;AAC3B,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,MAAM,CAAC;AACrB,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAk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,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+CAA+C,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC"}
@@ -39,6 +39,8 @@ __exportStar(require("./mecanicalWaves"), exports);
39
39
  __exportStar(require("./fluids"), exports);
40
40
  __exportStar(require("./electricity"), exports);
41
41
  __exportStar(require("./calibrationCurveOfSolution"), exports);
42
+ __exportStar(require("./dosage"), exports);
43
+ __exportStar(require("./spectral"), exports);
42
44
  /**exos pris des maths */
43
45
  __exportStar(require("../math/percent/findProportion"), exports);
44
46
  __exportStar(require("../math/calcul/proportionality/proportionalityTable"), exports);
@@ -10,7 +10,7 @@ const getConcentrationReadingQuestion = () => {
10
10
  const absorbtion = (0, randfloat_1.randfloat)(0.5, 5);
11
11
  const concentration = (0, randfloat_1.randfloat)(0.1, 2);
12
12
  const commands = [
13
- `L = Line((0,0), (${concentration}, ${absorbtion}))`,
13
+ `L = Line[(0,0), (${concentration}, ${absorbtion})]`,
14
14
  `SetFixed(L, true)`,
15
15
  `SetColor(L, "${(0, colors_1.randomColor)()}")`,
16
16
  ];
@@ -22,7 +22,7 @@ const getMoleculeNomenclature = () => {
22
22
  };
23
23
  const getPropositions = (n, { answer }) => {
24
24
  const propositions = [];
25
- (0, exercise_1.addValidProp)(propositions, answer);
25
+ (0, exercise_1.addValidProp)(propositions, answer, "raw");
26
26
  const organicMolecule = molecule_1.molecules.filter((molecule) => molecule.isOrganic && molecule.type);
27
27
  while (propositions.length < n) {
28
28
  const randomMoleculeIndex = Math.floor(Math.random() * organicMolecule.length);
@@ -47,5 +47,5 @@ exports.frequencyComparison = {
47
47
  getPropositions,
48
48
  isAnswerValid,
49
49
  subject: "Physique",
50
- answerType: "QCM",
50
+ answerType: "QCU",
51
51
  };
@@ -0,0 +1,2 @@
1
+ export * from "./spectralEnergy";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/spectral/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./spectralEnergy"), exports);
@@ -0,0 +1,10 @@
1
+ import { Exercise } from "../../../exercises/exercise";
2
+ import { Measure } from "../../../pc/measure/measure";
3
+ type Identifiers = {
4
+ wavelengths: Measure[];
5
+ targetColor: "bleue" | "verte" | "rouge";
6
+ energy: Measure;
7
+ };
8
+ export declare const SpectralEnergyExercise: Exercise<Identifiers>;
9
+ export {};
10
+ //# sourceMappingURL=spectralEnergy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spectralEnergy.d.ts","sourceRoot":"","sources":["../../../../src/exercises/pc/spectral/spectralEnergy.ts"],"names":[],"mappings":"AACA,OAAO,EACL,QAAQ,EAST,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAKnD,KAAK,WAAW,GAAG;IACjB,WAAW,EAAE,OAAO,EAAE,CAAC;IACvB,WAAW,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACzC,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAwJF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAaxD,CAAC"}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SpectralEnergyExercise = void 0;
4
+ const exercise_1 = require("../../../exercises/exercise");
5
+ const getDistinctQuestions_1 = require("../../../exercises/utils/getDistinctQuestions");
6
+ const measure_1 = require("../../../pc/measure/measure");
7
+ const randfloat_1 = require("../../../math/utils/random/randfloat");
8
+ const randint_1 = require("../../../math/utils/random/randint");
9
+ const quantic_1 = require("../../../pc/constants/quantic");
10
+ const wavelengths = {
11
+ bleue: { min: 400, max: 455 },
12
+ verte: { min: 500, max: 560 },
13
+ rouge: { min: 610, max: 660 },
14
+ };
15
+ const h = new measure_1.Measure(quantic_1.planckConstant.value.significantPart, quantic_1.planckConstant.value.exponent);
16
+ const c = new measure_1.Measure(quantic_1.lightSpeed.value.significantPart, quantic_1.lightSpeed.value.exponent);
17
+ const images = [
18
+ `https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/xpliveV2/activities/quizzes/generator/emissionSpectrum1.png`,
19
+ `https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/xpliveV2/activities/quizzes/generator/emissionSpectrum2.png`,
20
+ `https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/xpliveV2/activities/quizzes/generator/emissionSpectrum3.png`,
21
+ `https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/xpliveV2/activities/quizzes/generator/emissionSpectrum4.png`,
22
+ `https://heureuxhasarddocsbucket.s3.eu-west-3.amazonaws.com/xpliveV2/activities/quizzes/generator/emissionSpectrum5.png`,
23
+ ];
24
+ const getSpectralEnergyQuestion = () => {
25
+ const wavelengthBlueNm = (0, randint_1.randint)(wavelengths.bleue.min, wavelengths.bleue.max);
26
+ const wavelengthGreenNm = (0, randint_1.randint)(wavelengths.verte.min, wavelengths.verte.max);
27
+ const wavelengthRedNm = (0, randint_1.randint)(wavelengths.rouge.min, wavelengths.rouge.max);
28
+ const wavelengthBlue = new measure_1.Measure(wavelengthBlueNm, -9);
29
+ const wavelengthGreen = new measure_1.Measure(wavelengthGreenNm, -9);
30
+ const wavelengthRed = new measure_1.Measure(wavelengthRedNm, -9);
31
+ const energies = {
32
+ bleue: h.times(c).divide(wavelengthBlue).toSignificant(2),
33
+ verte: h.times(c).divide(wavelengthGreen).toSignificant(2),
34
+ rouge: h.times(c).divide(wavelengthRed).toSignificant(2),
35
+ };
36
+ const colors = ["bleue", "verte", "rouge"];
37
+ const targetColor = colors[(0, randint_1.randint)(0, colors.length - 1)];
38
+ const targetEnergy = energies[targetColor];
39
+ const instruction = `Vous travaillez dans un laboratoire de spectroscopie et vous êtes en train de réaliser une analyse des transitions électroniques d'un échantillon. \n
40
+ Vous avez utilisé un spectromètre pour mesurer les longueurs d'onde des raies d'émission de la lumière émise par l'échantillon. \n
41
+ Les mesures que vous avez obtenues sont les suivantes :
42
+
43
+ - Longueur d'onde de la lumière bleue : $\\lambda_{bleue} = ${wavelengthBlueNm}\\ nm$,
44
+ - Longueur d'onde de la lumière verte : $\\lambda_{verte} = ${wavelengthGreenNm}\\ nm$,
45
+ - Longueur d'onde de la lumière rouge : $\\lambda_{rouge} = ${wavelengthRedNm}\\ nm$.
46
+
47
+ ![](${images[(0, randint_1.randint)(0, images.length)]})
48
+
49
+ En utilisant ces données, calculez l'énergie de transition en joules pour la lumière ${targetColor} émise par l'échantillon.`;
50
+ const hint = `La relation entre l'énergie et la longueur d'onde est : $E = \\frac{hc}{\\lambda}$. \n
51
+ Rappel des constantes :
52
+ - Constante de Planck : $h = ${h.toSignificant(2).toTex()}$
53
+ - Vitesse de la lumière : $c = ${c.toSignificant(2).toTex()}$`;
54
+ const correction = `La relation entre l'énergie et la longueur d'onde est donnée par :
55
+ $E = \\frac{hc}{\\lambda}$.
56
+
57
+ \n En utilisant les valeurs fournies pour $h$, $c$, et $\\lambda_{${targetColor}}$ (en mètres), vous pouvez résoudre pour l'énergie : \n
58
+ $E_{${targetColor}} = \\dfrac{${h.toTex({ scientific: 2 })} \\times ${c.toTex({
59
+ scientific: 2,
60
+ })}}{${targetColor === "bleue"
61
+ ? wavelengthBlue.toTex({
62
+ scientific: 2,
63
+ })
64
+ : targetColor === "rouge"
65
+ ? wavelengthRed.toTex({ scientific: 2 })
66
+ : wavelengthGreen.toTex({ scientific: 2 })}} = ${targetEnergy.toTex()}\\ J$. \n
67
+
68
+ Rappel des constantes :
69
+
70
+ - Constante de Planck : $h = ${h.toSignificant(2).toTex()}$
71
+ - Vitesse de la lumière : $c = ${c.toSignificant(2).toTex()}$`;
72
+ const question = {
73
+ answer: targetEnergy.toTex(),
74
+ instruction,
75
+ hint,
76
+ correction,
77
+ keys: [],
78
+ answerFormat: "tex",
79
+ identifiers: {
80
+ wavelengths: [wavelengthBlue, wavelengthGreen, wavelengthRed],
81
+ targetColor,
82
+ energy: targetEnergy,
83
+ },
84
+ };
85
+ return question;
86
+ };
87
+ const getPropositions = (n, { answer, energy }) => {
88
+ const propositions = [];
89
+ (0, exercise_1.addValidProp)(propositions, answer);
90
+ const incorrectValues = [
91
+ new measure_1.Measure((0, randfloat_1.randfloat)(0.1, 10, 2), -19).toSignificant(2),
92
+ energy.times(new measure_1.Measure(1, -8)),
93
+ energy.times(new measure_1.Measure(1, 34)),
94
+ ];
95
+ incorrectValues.forEach((value) => {
96
+ (0, exercise_1.tryToAddWrongProp)(propositions, value.toTex());
97
+ });
98
+ while (propositions.length < n) {
99
+ (0, exercise_1.tryToAddWrongProp)(propositions, new measure_1.Measure((0, randfloat_1.randfloat)(0.1, 10, 2), -19).toSignificant(2).toTex());
100
+ }
101
+ return (0, exercise_1.shuffleProps)(propositions, n);
102
+ };
103
+ const isAnswerValid = (ans, { answer, energy, wavelengths, targetColor }) => {
104
+ const energies = {
105
+ bleue: h.times(c).divide(wavelengths[0]),
106
+ verte: h.times(c).divide(wavelengths[1]),
107
+ rouge: h.times(c).divide(wavelengths[2]),
108
+ };
109
+ const targetEnergy = energies[targetColor];
110
+ const validAnswer1 = targetEnergy.toSignificant(1).toTex();
111
+ const validAnswer2 = targetEnergy.toSignificant(2).toTex();
112
+ const validAnswer3 = targetEnergy.toSignificant(3).toTex();
113
+ let latexs = [];
114
+ latexs.push(validAnswer1, validAnswer2, validAnswer3);
115
+ return latexs.includes(ans);
116
+ };
117
+ exports.SpectralEnergyExercise = {
118
+ id: "spectralEnergy",
119
+ label: "Calculer l'énergie d'une lumière à partir de la longueur d'onde",
120
+ levels: ["TermSpé"],
121
+ isSingleStep: true,
122
+ sections: ["Quantique"],
123
+ generator: (nb) => (0, getDistinctQuestions_1.getDistinctQuestions)(getSpectralEnergyQuestion, nb),
124
+ qcmTimer: 60,
125
+ freeTimer: 60,
126
+ getPropositions,
127
+ isAnswerValid,
128
+ subject: "Physique",
129
+ };
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPointFromGGB = void 0;
4
4
  const point_1 = require("../../../math/geometry/point");
5
5
  function getPointFromGGB(command, name, isInteger = true) {
6
- const splitted = command.split(";");
6
+ const splitted = command.split(",");
7
7
  const x = isInteger
8
8
  ? +(+splitted[0].replace("(", "")).toFixed(0)
9
9
  : +splitted[0].replace("(", "");
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isGGBLine = void 0;
4
4
  function isGGBLine(command) {
5
- const regex = /Line\([A-Z],\s[A-Z]\)/;
5
+ const regex = /Line\[[A-Z],\s[A-Z]\]/;
6
6
  return regex.test(command);
7
7
  }
8
8
  exports.isGGBLine = isGGBLine;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isGGBPoint = void 0;
4
4
  function isGGBPoint(command) {
5
- const regex = /\(-?\d+(\.\d+)?;-?\d+(\.\d+)?\)/;
5
+ const regex = /\(-?\d+(\.\d+)?\,-?\d+(\.\d+)?\)/;
6
6
  return regex.test(command);
7
7
  }
8
8
  exports.isGGBPoint = isGGBPoint;
package/lib/index.d.ts CHANGED
@@ -892,7 +892,10 @@ declare const mathExercises: (import("./exercises/exercise").Exercise<{
892
892
  uY: number;
893
893
  aX: number;
894
894
  aY: number;
895
- }> | import("./exercises/exercise").Exercise<{}> | import("./exercises/exercise").Exercise<{
895
+ }> | import("./exercises/exercise").Exercise<{
896
+ x: number;
897
+ y: number;
898
+ }> | import("./exercises/exercise").Exercise<{
896
899
  trinom: number[];
897
900
  }> | import("./exercises/exercise").Exercise<{
898
901
  askConvex: boolean;
@@ -1617,6 +1620,17 @@ declare const pcExercises: (import("./exercises/exercise").Exercise<{
1617
1620
  }> | import("./exercises/exercise").Exercise<{
1618
1621
  epsilon: number;
1619
1622
  l: number;
1623
+ }> | import("./exercises/exercise").Exercise<{
1624
+ moleculeName: string;
1625
+ concentration: number;
1626
+ molarAbsorptivity: number;
1627
+ pathLength: number;
1628
+ absorbance: number;
1629
+ randomIndex: number;
1630
+ }> | import("./exercises/exercise").Exercise<{
1631
+ wavelengths: import("./pc/measure/measure").Measure[];
1632
+ targetColor: "rouge" | "verte" | "bleue";
1633
+ energy: import("./pc/measure/measure").Measure;
1620
1634
  }>)[];
1621
1635
  export { mathExercises, pcExercises };
1622
1636
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,MAAM,EAAE,MAAM,aAAa,CAAC;QAC5B,SAAS,EAAE,MAAM,MAAM,CAAC;QAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA/BF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAEgD,CAAC;AACnD,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAA6B,CAAC;AAE/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Measure } from "../measure/measure";
2
+ type PhysicalConstant = {
3
+ value: Measure;
4
+ unit: string;
5
+ };
6
+ export declare const planckConstant: PhysicalConstant;
7
+ export declare const lightSpeed: PhysicalConstant;
8
+ export {};
9
+ //# sourceMappingURL=quantic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quantic.d.ts","sourceRoot":"","sources":["../../../src/pc/constants/quantic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,gBAI5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,gBAIxB,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lightSpeed = exports.planckConstant = void 0;
4
+ const measure_1 = require("../measure/measure");
5
+ exports.planckConstant = {
6
+ value: new measure_1.Measure(6.626, -34),
7
+ // value: 6.626 * Math.pow(10, -34),
8
+ unit: "\\text{J.s}",
9
+ };
10
+ exports.lightSpeed = {
11
+ value: new measure_1.Measure(3, 8),
12
+ // value: 3 * Math.pow(10, 8),
13
+ unit: "\\text{m.s^(-1)}",
14
+ };
package/lib/server.js CHANGED
@@ -35,7 +35,9 @@ const dotenv_1 = __importDefault(require("dotenv"));
35
35
  const cors_1 = __importDefault(require("cors"));
36
36
  const numberNode_1 = require("./tree/nodes/numbers/numberNode");
37
37
  const infiniteNode_1 = require("./tree/nodes/numbers/infiniteNode");
38
+ const multiplyNode_1 = require("./tree/nodes/operators/multiplyNode");
38
39
  const toScientific_1 = require("./utils/numberPrototype/toScientific");
40
+ const variableNode_1 = require("./tree/nodes/variables/variableNode");
39
41
  const jsonParser = body_parser_1.default.json();
40
42
  const mathExercises = Object.values(MathExercises);
41
43
  const pcExercises = Object.values(PCExercises);
@@ -60,16 +62,10 @@ const runServer = () => {
60
62
  app.use((0, cors_1.default)());
61
63
  console.log("math exos", mathExercises.length);
62
64
  console.log("pc exos", pcExercises.length);
63
- // const node = new MultiplyNode(
64
- // (4).toTree(),
65
- // new CosNode(
66
- // new MultiplyNode(
67
- // new FractionNode(new MultiplyNode((2).toTree(), PiNode), (3).toTree()),
68
- // new VariableNode("x"),
69
- // ),
70
- // ),
71
- // ).simplify();
72
- // console.log(node);
65
+ const node = new multiplyNode_1.MultiplyNode(new variableNode_1.VariableNode("x"), new variableNode_1.VariableNode("x"))
66
+ .simplify()
67
+ .toTex();
68
+ console.log(node);
73
69
  app.get("/", (req, res) => {
74
70
  res.json(allExercises);
75
71
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "math-exercises",
3
- "version": "2.1.26-beta.1",
3
+ "version": "2.1.26-beta.11",
4
4
  "description": "Math exercises generator for middle school and high school",
5
5
  "main": "lib/index.js",
6
6
  "files": [