math-exercises 3.0.152 → 3.0.154

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 (127) hide show
  1. package/lib/exercises/exercise.d.ts +2 -0
  2. package/lib/exercises/exercise.d.ts.map +1 -1
  3. package/lib/exercises/math/calculLitteral/equation/index.d.ts +1 -1
  4. package/lib/exercises/math/calculLitteral/equation/index.d.ts.map +1 -1
  5. package/lib/exercises/math/calculLitteral/equation/index.js +1 -1
  6. package/lib/exercises/math/calculLitteral/equation/square/equationSimpleSquare.d.ts +10 -0
  7. package/lib/exercises/math/calculLitteral/equation/square/equationSimpleSquare.d.ts.map +1 -0
  8. package/lib/exercises/math/calculLitteral/equation/square/equationSimpleSquare.js +183 -0
  9. package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.d.ts +10 -0
  10. package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.d.ts.map +1 -0
  11. package/lib/exercises/math/calculLitteral/equation/square/equationSquareWithSteps.js +173 -0
  12. package/lib/exercises/math/calculLitteral/equation/square/index.d.ts +3 -0
  13. package/lib/exercises/math/calculLitteral/equation/square/index.d.ts.map +1 -0
  14. package/lib/exercises/math/calculLitteral/equation/square/index.js +2 -0
  15. package/lib/exercises/math/functions/sqrt/squareRootCalculation.d.ts.map +1 -1
  16. package/lib/exercises/math/functions/sqrt/squareRootCalculation.js +4 -2
  17. package/lib/exercises/math/geometry/euclidian/homothetyFactorFromPoints.d.ts +15 -0
  18. package/lib/exercises/math/geometry/euclidian/homothetyFactorFromPoints.d.ts.map +1 -0
  19. package/lib/exercises/math/geometry/euclidian/homothetyFactorFromPoints.js +301 -0
  20. package/lib/exercises/math/geometry/euclidian/index.d.ts +7 -0
  21. package/lib/exercises/math/geometry/euclidian/index.d.ts.map +1 -1
  22. package/lib/exercises/math/geometry/euclidian/index.js +7 -0
  23. package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.d.ts +21 -0
  24. package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.d.ts.map +1 -0
  25. package/lib/exercises/math/geometry/euclidian/pinPointFromAxialOrCentralSymmetry.js +406 -0
  26. package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.d.ts +18 -0
  27. package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.d.ts.map +1 -0
  28. package/lib/exercises/math/geometry/euclidian/pinPointFromRotation.js +315 -0
  29. package/lib/exercises/math/geometry/euclidian/pinPointFromTranslation.d.ts +20 -0
  30. package/lib/exercises/math/geometry/euclidian/pinPointFromTranslation.d.ts.map +1 -0
  31. package/lib/exercises/math/geometry/euclidian/pinPointFromTranslation.js +314 -0
  32. package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.d.ts +18 -0
  33. package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.d.ts.map +1 -0
  34. package/lib/exercises/math/geometry/euclidian/pinSegmentFromRotation.js +387 -0
  35. package/lib/exercises/math/geometry/euclidian/recognizeAngleFromRotation.d.ts +18 -0
  36. package/lib/exercises/math/geometry/euclidian/recognizeAngleFromRotation.d.ts.map +1 -0
  37. package/lib/exercises/math/geometry/euclidian/recognizeAngleFromRotation.js +309 -0
  38. package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.d.ts +17 -0
  39. package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.d.ts.map +1 -0
  40. package/lib/exercises/math/geometry/euclidian/recognizeHomothetyCenter.js +301 -0
  41. package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.d.ts.map +1 -1
  42. package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromAxialSymetry.js +22 -8
  43. package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromCentralSymmetry.d.ts +11 -0
  44. package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromCentralSymmetry.d.ts.map +1 -0
  45. package/lib/exercises/math/geometry/euclidianConstructions/buildPointFromCentralSymmetry.js +169 -0
  46. package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts +2 -0
  47. package/lib/exercises/math/geometry/euclidianConstructions/index.d.ts.map +1 -1
  48. package/lib/exercises/math/geometry/euclidianConstructions/index.js +2 -0
  49. package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.d.ts +16 -0
  50. package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.d.ts.map +1 -0
  51. package/lib/exercises/math/geometry/euclidianConstructions/placeHomothetyCenter.js +309 -0
  52. package/lib/exercises/math/probaStat/basicProbas/index.js +1 -0
  53. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.d.ts +11 -0
  54. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.d.ts.map +1 -0
  55. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableSituations.js +136 -0
  56. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.d.ts.map +1 -1
  57. package/lib/exercises/math/probaStat/basicProbas/pickEquiprobableTo.js +3 -79
  58. package/lib/exercises/math/probaStat/stats1var/averageWithClasses.d.ts +9 -0
  59. package/lib/exercises/math/probaStat/stats1var/averageWithClasses.d.ts.map +1 -0
  60. package/lib/exercises/math/probaStat/stats1var/averageWithClasses.js +140 -0
  61. package/lib/exercises/math/probaStat/stats1var/averageWithTableWithContext.d.ts +8 -0
  62. package/lib/exercises/math/probaStat/stats1var/averageWithTableWithContext.d.ts.map +1 -0
  63. package/lib/exercises/math/probaStat/stats1var/averageWithTableWithContext.js +113 -0
  64. package/lib/exercises/math/probaStat/stats1var/index.d.ts +2 -0
  65. package/lib/exercises/math/probaStat/stats1var/index.d.ts.map +1 -1
  66. package/lib/exercises/math/probaStat/stats1var/index.js +2 -0
  67. package/lib/exercises/math/probaStat/stats1var/medianWithList.js +4 -4
  68. package/lib/exercises/math/scratch/index.d.ts +3 -0
  69. package/lib/exercises/math/scratch/index.d.ts.map +1 -1
  70. package/lib/exercises/math/scratch/index.js +3 -0
  71. package/lib/exercises/math/scratch/scratchListElemAtIndex.d.ts +13 -0
  72. package/lib/exercises/math/scratch/scratchListElemAtIndex.d.ts.map +1 -0
  73. package/lib/exercises/math/scratch/scratchListElemAtIndex.js +189 -0
  74. package/lib/exercises/math/scratch/scratchListElemAtIndex2.d.ts +23 -0
  75. package/lib/exercises/math/scratch/scratchListElemAtIndex2.d.ts.map +1 -0
  76. package/lib/exercises/math/scratch/scratchListElemAtIndex2.js +207 -0
  77. package/lib/exercises/math/scratch/scratchListFilter.d.ts +13 -0
  78. package/lib/exercises/math/scratch/scratchListFilter.d.ts.map +1 -0
  79. package/lib/exercises/math/scratch/scratchListFilter.js +397 -0
  80. package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.d.ts +14 -0
  81. package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.d.ts.map +1 -0
  82. package/lib/exercises/math/spaceGeometry/basis/findSpacePointOnRectangularPrism.js +347 -0
  83. package/lib/exercises/math/spaceGeometry/basis/index.d.ts +1 -0
  84. package/lib/exercises/math/spaceGeometry/basis/index.d.ts.map +1 -1
  85. package/lib/exercises/math/spaceGeometry/basis/index.js +1 -0
  86. package/lib/exercises/math/spaceGeometry/index.d.ts +2 -0
  87. package/lib/exercises/math/spaceGeometry/index.d.ts.map +1 -1
  88. package/lib/exercises/math/spaceGeometry/index.js +2 -0
  89. package/lib/exercises/math/spaceGeometry/sections/areaOfConeSection.js +3 -3
  90. package/lib/exercises/math/spaceGeometry/solids/index.d.ts +3 -0
  91. package/lib/exercises/math/spaceGeometry/solids/index.d.ts.map +1 -0
  92. package/lib/exercises/math/spaceGeometry/solids/index.js +2 -0
  93. package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFrom3D.d.ts +15 -0
  94. package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFrom3D.d.ts.map +1 -0
  95. package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFrom3D.js +440 -0
  96. package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.d.ts +11 -0
  97. package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.d.ts.map +1 -0
  98. package/lib/exercises/math/spaceGeometry/solids/recognizeSolidFromSolidPattern.js +1089 -0
  99. package/lib/exercises/math/spaceGeometry/sphere/index.d.ts +2 -0
  100. package/lib/exercises/math/spaceGeometry/sphere/index.d.ts.map +1 -0
  101. package/lib/exercises/math/spaceGeometry/sphere/index.js +2 -0
  102. package/lib/exercises/math/spaceGeometry/sphere/pickIsPointInSphereOrBall.d.ts +9 -0
  103. package/lib/exercises/math/spaceGeometry/sphere/pickIsPointInSphereOrBall.d.ts.map +1 -0
  104. package/lib/exercises/math/spaceGeometry/sphere/pickIsPointInSphereOrBall.js +127 -0
  105. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.d.ts +14 -0
  106. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.d.ts.map +1 -0
  107. package/lib/exercises/math/spaceGeometry/sphere/sphereLatLonReading.js +390 -0
  108. package/lib/geogebra/geogebraConstructor.d.ts +2 -0
  109. package/lib/geogebra/geogebraConstructor.d.ts.map +1 -1
  110. package/lib/geogebra/geogebraConstructor.js +6 -0
  111. package/lib/geogebra/probas/probaWheelGGBCommands.d.ts +7 -0
  112. package/lib/geogebra/probas/probaWheelGGBCommands.d.ts.map +1 -0
  113. package/lib/geogebra/probas/probaWheelGGBCommands.js +79 -0
  114. package/lib/index.d.ts +171 -5
  115. package/lib/index.d.ts.map +1 -1
  116. package/lib/math/geometry/point.d.ts +6 -0
  117. package/lib/math/geometry/point.d.ts.map +1 -1
  118. package/lib/math/geometry/point.js +28 -0
  119. package/lib/server.js +4 -1
  120. package/lib/tree/nodes/equations/equalNode.d.ts +1 -1
  121. package/lib/tree/nodes/equations/equalNode.d.ts.map +1 -1
  122. package/lib/tree/nodes/equations/equalNode.js +0 -1
  123. package/lib/tree/utilities/nodeSimplifier.d.ts +1 -1
  124. package/lib/utils/arrays/arrayZip.d.ts +2 -0
  125. package/lib/utils/arrays/arrayZip.d.ts.map +1 -0
  126. package/lib/utils/arrays/arrayZip.js +12 -0
  127. package/package.json +1 -1
@@ -0,0 +1,136 @@
1
+ import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
4
+ import { probaWheelGGBCommands } from "../../../../geogebra/probas/probaWheelGGBCommands.js";
5
+ import { randint } from "../../../../math/utils/random/randint.js";
6
+ //on note le numéro du secteur obtenu
7
+ //on note la couleur du secteur obtenu
8
+ //on note la parité du numéro obtenu
9
+ const getPropositions = (n, { answer, items }) => {
10
+ const propositions = [];
11
+ addValidProp(propositions, answer);
12
+ const colors = [0, 0, 0, 0];
13
+ const nums = [0, 0, 0, 0, 0, 0, 0, 0, 0];
14
+ const pars = [0, 0];
15
+ for (let i = 0; i < items.length; i++) {
16
+ colors[items[i].indexColor]++;
17
+ nums[items[i].value]++;
18
+ if (items[i].value % 2 === 0)
19
+ pars[0]++;
20
+ else
21
+ pars[1]++;
22
+ }
23
+ if (colors.filter((e) => !!e).every((i) => i === colors[0]))
24
+ addValidProp(propositions, "On note la couleur du secteur obtenu", "raw");
25
+ else
26
+ tryToAddWrongProp(propositions, "On note la couleur du secteur obtenu", "raw");
27
+ if (nums.filter((e) => !!e).every((i) => i === nums[0]))
28
+ addValidProp(propositions, "On note le numéro du secteur obtenu", "raw");
29
+ else
30
+ tryToAddWrongProp(propositions, "On note le numéro du secteur obtenu", "raw");
31
+ if (pars.every((i) => i === pars[0]))
32
+ addValidProp(propositions, "On note la parité du secteur obtenu (pair ou impair)", "raw");
33
+ else
34
+ tryToAddWrongProp(propositions, "On note la parité du secteur obtenu (pair ou impair)", "raw");
35
+ return shuffleProps(propositions, n);
36
+ };
37
+ const getInstruction = (identifiers) => {
38
+ const { items } = identifiers;
39
+ return `On fait tourner la roue ci-dessous, dont les $${items.length}$ secteurs ont la même aire.
40
+
41
+ Parmi les situations proposées, laquelle ou lesquelles sont des situations d'équiprobabilité ?`;
42
+ };
43
+ const getHint = () => {
44
+ return "On est dans une situation d'équiprobabilité lorsque toutes les issues ont la même probabilité de se réaliser.";
45
+ };
46
+ const getCorrection = (identifiers) => {
47
+ const { items } = identifiers;
48
+ const colors = [0, 0, 0, 0];
49
+ const nums = [0, 0, 0, 0, 0, 0, 0, 0, 0];
50
+ const pars = [0, 0];
51
+ for (let i = 0; i < items.length; i++) {
52
+ colors[items[i].indexColor]++;
53
+ nums[items[i].value]++;
54
+ if (items[i].value % 2 === 0)
55
+ pars[0]++;
56
+ else
57
+ pars[1]++;
58
+ }
59
+ return `On détaille chaque situation :
60
+
61
+ -
62
+ -
63
+ - `;
64
+ };
65
+ const getGGBOptions = (identifiers) => {
66
+ const { items } = identifiers;
67
+ const ggb = new GeogebraConstructor({
68
+ commands: [...probaWheelGGBCommands(items)],
69
+ hideAxes: true,
70
+ hideGrid: true,
71
+ forbidShiftDragZoom: true,
72
+ });
73
+ return ggb.getOptions({
74
+ coords: [-15, 15, -15, 15],
75
+ });
76
+ };
77
+ const hasRightAnswer = (items) => {
78
+ const colors = [0, 0, 0, 0];
79
+ const nums = [0, 0, 0, 0, 0, 0, 0, 0, 0];
80
+ const pars = [0, 0];
81
+ for (let i = 0; i < items.length; i++) {
82
+ colors[items[i].indexColor]++;
83
+ nums[items[i].value]++;
84
+ if (items[i].value % 2 === 0)
85
+ pars[0]++;
86
+ else
87
+ pars[1]++;
88
+ }
89
+ return (colors.filter((e) => !!e).every((i) => i === colors[0]) ||
90
+ nums
91
+ .filter((e) => !!e)
92
+ .every((i) => i === nums[0] || pars.every((i) => i === pars[0])));
93
+ };
94
+ const getPickEquiprobableSituationsQuestion = () => {
95
+ let items = [];
96
+ do {
97
+ items = [];
98
+ for (let i = 0; i < 9; i++) {
99
+ items.push({
100
+ value: randint(1, 10),
101
+ indexColor: randint(0, 4),
102
+ });
103
+ }
104
+ } while (!hasRightAnswer(items));
105
+ const identifiers = { items };
106
+ return getQuestionFromIdentifiers(identifiers);
107
+ };
108
+ const getQuestionFromIdentifiers = (identifiers) => {
109
+ return {
110
+ instruction: getInstruction(identifiers),
111
+ keys: [],
112
+ answerFormat: "tex",
113
+ identifiers,
114
+ hint: getHint(identifiers),
115
+ correction: getCorrection(identifiers),
116
+ ggbOptions: getGGBOptions(identifiers),
117
+ };
118
+ };
119
+ export const pickEquiprobableSituations = {
120
+ id: "pickEquiprobableSituations",
121
+ label: "Déterminer les situations d'équiprobabilité",
122
+ isSingleStep: true,
123
+ generator: (nb, opts) => getDistinctQuestions(() => getPickEquiprobableSituationsQuestion(opts), nb),
124
+ qcmTimer: 60,
125
+ freeTimer: 60,
126
+ getPropositions,
127
+ subject: "Mathématiques",
128
+ getHint,
129
+ getCorrection,
130
+ getInstruction,
131
+ getGGBOptions,
132
+ hasGeogebra: true,
133
+ getQuestionFromIdentifiers,
134
+ answerType: "QCM",
135
+ isQCM: true,
136
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"pickEquiprobableTo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicProbas/pickEquiprobableTo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAqKrC,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAgIF,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA2NF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAmBpD,CAAC"}
1
+ {"version":3,"file":"pickEquiprobableTo.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/basicProbas/pickEquiprobableTo.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAYT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,SAAS,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAgIF,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AA2NF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAmBpD,CAAC"}
@@ -1,13 +1,9 @@
1
1
  import { addValidProp, shuffleProps, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
2
  import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
- import { blueMain, colorWithOpacity, greenLight, orange, red, } from "../../../../geogebra/colors.js";
3
+ import { blueMain, greenLight, orange, red } from "../../../../geogebra/colors.js";
4
4
  import { GeogebraConstructor } from "../../../../geogebra/geogebraConstructor.js";
5
- import { Point } from "../../../../math/geometry/point.js";
6
- import { Vector } from "../../../../math/geometry/vector.js";
5
+ import { probaWheelGGBCommands } from "../../../../geogebra/probas/probaWheelGGBCommands.js";
7
6
  import { randint } from "../../../../math/utils/random/randint.js";
8
- import { round } from "../../../../math/utils/round.js";
9
- import { PiNode } from "../../../../tree/nodes/numbers/piNode.js";
10
- import { add } from "../../../../tree/nodes/operators/addNode.js";
11
7
  import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
12
8
  import { substract } from "../../../../tree/nodes/operators/substractNode.js";
13
9
  import { random, randomMany } from "../../../../utils/alea/random.js";
@@ -15,78 +11,6 @@ import { shuffle } from "../../../../utils/alea/shuffle.js";
15
11
  import { mdTable } from "../../../../utils/markdown/mdTable.js";
16
12
  const colors = [red, blueMain, greenLight, orange];
17
13
  const colorNames = ["rouge", "bleu", "vert", "orange"];
18
- const createVector = (from, to, name, precision = 5) => {
19
- return new Vector(name, round(substract(to.x, from.x).evaluate(), precision).toTree(), round(substract(to.y, from.y).evaluate(), precision).toTree());
20
- };
21
- const createPoint = (x, y, name, precision = 5) => {
22
- return new Point(name, round(x, precision), round(y, precision));
23
- };
24
- const rotatePoint = (target, angle, center, name, precision = 2) => {
25
- const vSrc = createVector(center, target, "vSrc", precision);
26
- const vRotated = vSrc.rotate(angle, "vRotated");
27
- return createPoint(add(center.x, vRotated.x).evaluate(), add(center.y, vRotated.y).evaluate(), name, precision);
28
- };
29
- const createPointWithWeights = (arrPointAndWeight) => {
30
- return arrPointAndWeight.reduce((acc, [p, w]) => {
31
- return new Point("acc", acc.x.evaluate() + w * p.x.evaluate(), acc.y.evaluate() + w * p.y.evaluate());
32
- }, new Point("O", 0, 0));
33
- };
34
- const probaWheelGGBCommands = (arrItem) => {
35
- const radius = 12;
36
- const point0 = new Point("O", 0, 0);
37
- function createWheelItemGGBCommands(wheelItem, i, angleInDegreesSector) {
38
- const angleInRadiansSector = (angleInDegreesSector * PiNode.evaluate()) / 180.0;
39
- const point1Raw = new Point("P1", radius, 0);
40
- const point2Raw = new Point("P2", radius * Math.cos(angleInRadiansSector), radius * Math.sin(angleInRadiansSector));
41
- const angleInRadiansRotate = (2 * PiNode.evaluate() * (1.0 * i + 0.5)) / arrItem.length + //center wrt sector
42
- (PiNode.evaluate() * 3.0) / 2.0; //put first sector on top
43
- const [point1, point2] = [point1Raw, point2Raw].map((pointRaw) => {
44
- return rotatePoint(pointRaw, -angleInRadiansRotate, point0, "rotated", 3);
45
- });
46
- const pointForLabel = createPointWithWeights([
47
- [point0, 0.24],
48
- [point1, 0.38],
49
- [point2, 0.38],
50
- ]);
51
- return [
52
- //circular sector
53
- `C_${i} = CircularSector(${point0.toMathString()}, ${point1.toMathString()}, ${point2.toMathString()})`,
54
- `SetFixed(C_${i}, true, false)`,
55
- `SetColor(C_${i}, "${colorWithOpacity(colors[wheelItem.indexColor], 80)}")`,
56
- `SetLineThickness(C_${i}, 1)`,
57
- //border
58
- `Cb_${i} = CircularSector(${point0.toMathString()}, ${point1.toMathString()}, ${point2.toMathString()})`,
59
- `SetFixed(Cb_${i}, true, false)`,
60
- `SetColor(Cb_${i}, "#FF000000")`,
61
- `SetLineThickness(Cb_${i}, 1)`,
62
- //label
63
- `L_${i} = Text("$\\large \\text{${wheelItem.value}}$", ${pointForLabel.toMathString()}, false, true, 0, 0)`,
64
- `SetFixed(L_${i}, true, false)`,
65
- ];
66
- }
67
- return [
68
- ...arrItem.flatMap((wheelItem, i) => {
69
- const angleInDegreesSector = 360.0 * (1.0 / arrItem.length);
70
- const itemCommands = createWheelItemGGBCommands(wheelItem, i, angleInDegreesSector);
71
- return [...itemCommands];
72
- }),
73
- //circle border
74
- `C = Circle(${point0.toMathString()}, ${radius * 1.05})`,
75
- `SetFixed(C, true, false)`,
76
- //triangle
77
- ...(() => {
78
- const pointTL = new Point("TL", -0.03 * radius, radius + 0.03 * radius);
79
- const pointTR = new Point("TR", +0.03 * radius, radius + 0.03 * radius);
80
- const pointB = new Point("TB", 0, radius - 0.03 * radius);
81
- return [
82
- `T = Polygon(${pointTL.toMathString()},${pointTR.toMathString()},${pointB.toMathString()})`,
83
- `SetFilling(T, 1)`,
84
- `SetColor(T, "#FF000000")`,
85
- `SetFixed(T, true, false)`,
86
- ];
87
- })(),
88
- ];
89
- };
90
14
  const getDictEventsAndProba = (arrItem) => {
91
15
  const outDict = {};
92
16
  const indexesColorsUsed = [
@@ -356,7 +280,7 @@ const getQuestionFromIdentifiers = (identifiers) => {
356
280
  export const pickEquiprobableTo = {
357
281
  id: "pickEquiprobableTo",
358
282
  connector: "=",
359
- label: "Déterminer les situations équiprobables",
283
+ label: "Déterminer les situations équiprobables à une situation donnée",
360
284
  isSingleStep: true,
361
285
  generator: (nb, opts) => getDistinctQuestions(() => getPickEquiprobableToQuestion(opts), nb),
362
286
  qcmTimer: 60,
@@ -0,0 +1,9 @@
1
+ import { Exercise } from "../../../../exercises/exercise.js";
2
+ type Identifiers = {
3
+ bounds: number[];
4
+ situation: number;
5
+ effectifs: number[];
6
+ };
7
+ export declare const averageWithClasses: Exercise<Identifiers>;
8
+ export {};
9
+ //# sourceMappingURL=averageWithClasses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"averageWithClasses.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageWithClasses.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAeT,MAAM,6BAA6B,CAAC;AAgBrC,KAAK,WAAW,GAAG;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAqIF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,WAAW,CAkBpD,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { addValidProp, shuffleProps, propWhile, tryToAddWrongProp, } from "../../../../exercises/exercise.js";
2
+ import { getDistinctQuestions } from "../../../../exercises/utils/getDistinctQuestions.js";
3
+ import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
4
+ import { randfloat } from "../../../../math/utils/random/randfloat.js";
5
+ import { randint } from "../../../../math/utils/random/randint.js";
6
+ import { round } from "../../../../math/utils/round.js";
7
+ import { add, AddNode } from "../../../../tree/nodes/operators/addNode.js";
8
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
9
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
10
+ import { operatorComposition } from "../../../../tree/utilities/operatorComposition.js";
11
+ import { averageWithEffectifs } from "../../../../utils/average.js";
12
+ import { handleVEAError } from "../../../../utils/errors/handleVEAError.js";
13
+ import { alignTex } from "../../../../utils/latex/alignTex.js";
14
+ import { approxOrEqual } from "../../../../utils/latex/approxOrEqual.js";
15
+ import { mdTable } from "../../../../utils/markdown/mdTable.js";
16
+ const getPropositions = (n, { answer }) => {
17
+ const propositions = [];
18
+ addValidProp(propositions, answer);
19
+ const nbAnwer = answer.unfrenchify();
20
+ propWhile(propositions, n, () => {
21
+ tryToAddWrongProp(propositions, round(nbAnwer + randfloat(-5, 5, 1), 4).frenchify());
22
+ });
23
+ return shuffleProps(propositions, n);
24
+ };
25
+ const getAnswer = (identifiers) => {
26
+ const { bounds, effectifs } = identifiers;
27
+ const centers = bounds
28
+ .slice(0, bounds.length - 1)
29
+ .map((b, i) => round((b + bounds[i + 1]) / 2, 4));
30
+ return round(averageWithEffectifs(centers, effectifs), 1).frenchify();
31
+ };
32
+ const getInstruction = (identifiers) => {
33
+ const { bounds, effectifs } = identifiers;
34
+ const n = effectifs.reduce((acc, curr) => acc + curr, 0);
35
+ return `Un agriculteur a classé les $${n}$ oeufs pondus par ses poules selon leur calibre :
36
+
37
+ ${mdTable([
38
+ [
39
+ "Masse $m$ (en $\\textrm{g})$",
40
+ ...bounds
41
+ .slice(0, bounds.length - 1)
42
+ .map((b, i) => `$${b}\\leq m < ${bounds[i + 1]}$`),
43
+ ],
44
+ ["Effectif", ...effectifs.map((e) => `$${e}$`)],
45
+ ])}
46
+
47
+ Quel est le poids moyen des oeufs ?
48
+
49
+ Arrondir au dixième.`;
50
+ };
51
+ const getHint = () => {
52
+ return `Calcule le centre de chaque classe en faisant la moyenne des valeurs extrêmes de la classe. Puis, calcule la moyenne de la série en prenant comme valeurs les centres des classes.`;
53
+ };
54
+ const getCorrection = (identifiers) => {
55
+ const { bounds, effectifs } = identifiers;
56
+ const centers = bounds
57
+ .slice(0, bounds.length - 1)
58
+ .map((b, i) => round((b + bounds[i + 1]) / 2, 4));
59
+ const n = effectifs.reduce((acc, curr) => acc + curr, 0);
60
+ const avg = averageWithEffectifs(centers, effectifs);
61
+ const sum = centers.reduce((acc, curr, i) => acc + curr * effectifs[i], 0);
62
+ return `On calcule d'abord le centre de chaque classe :
63
+
64
+ ${bounds
65
+ .slice(0, bounds.length - 1)
66
+ .map((b, i) => `$$
67
+ ${frac(add(b, bounds[i + 1]), 2).toTex()} = ${round((b + bounds[i + 1]) / 2, 4).frenchify()}
68
+ $$`)
69
+ .join("\n \n")}
70
+
71
+ On calcule alors la moyenne en multipliant le centre de chaque classe par l'effectif correspondant :
72
+
73
+ ${alignTex([
74
+ [
75
+ "",
76
+ frac(operatorComposition(AddNode, centers.map((c, i) => multiply(c, effectifs[i]))), n).toTex(),
77
+ ],
78
+ ["=", frac(sum, n).toTex()],
79
+ approxOrEqual(avg, 1),
80
+ ])}
81
+
82
+ Le poids moyen des oeufs est donc de $${round(avg, 1).frenchify()} \\textrm{g}$.
83
+
84
+ `;
85
+ };
86
+ const getKeys = () => {
87
+ return [];
88
+ };
89
+ const isAnswerValid = (ans, { answer }) => {
90
+ try {
91
+ return numberVEA(ans, answer);
92
+ }
93
+ catch (err) {
94
+ return handleVEAError(err);
95
+ }
96
+ };
97
+ const getAverageWithClassesQuestion = () => {
98
+ const effectifs = [randint(5, 20)];
99
+ const bounds = [randint(30, 50)];
100
+ for (let i = 0; i < 3; i++) {
101
+ effectifs.push(randint(5, 20));
102
+ bounds.push(bounds[i] + randint(2, 7));
103
+ }
104
+ bounds.push(bounds[bounds.length - 1] + randint(2, 7));
105
+ const identifiers = {
106
+ situation: 0,
107
+ effectifs: effectifs,
108
+ bounds,
109
+ };
110
+ return getQuestionFromIdentifiers(identifiers);
111
+ };
112
+ const getQuestionFromIdentifiers = (identifiers) => {
113
+ return {
114
+ answer: getAnswer(identifiers),
115
+ instruction: getInstruction(identifiers),
116
+ keys: getKeys(identifiers),
117
+ answerFormat: "tex",
118
+ identifiers,
119
+ hint: getHint(identifiers),
120
+ correction: getCorrection(identifiers),
121
+ };
122
+ };
123
+ export const averageWithClasses = {
124
+ id: "averageWithClasses",
125
+ connector: "=",
126
+ label: "Calculer la moyenne d'une série regroupée en classes",
127
+ isSingleStep: true,
128
+ generator: (nb, opts) => getDistinctQuestions(() => getAverageWithClassesQuestion(opts), nb),
129
+ qcmTimer: 60,
130
+ freeTimer: 60,
131
+ getPropositions,
132
+ isAnswerValid,
133
+ subject: "Mathématiques",
134
+ getInstruction,
135
+ getHint,
136
+ getCorrection,
137
+ getAnswer,
138
+ getQuestionFromIdentifiers,
139
+ hasHintAndCorrection: true,
140
+ };
@@ -0,0 +1,8 @@
1
+ import { Exercise } from "../../../exercise.js";
2
+ type Identifiers = {
3
+ randomValues: number[];
4
+ randomEffectives: number[];
5
+ };
6
+ export declare const averageWithTableWithContext: Exercise<Identifiers>;
7
+ export {};
8
+ //# sourceMappingURL=averageWithTableWithContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"averageWithTableWithContext.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/averageWithTableWithContext.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,QAAQ,EAcT,MAAM,sBAAsB,CAAC;AAQ9B,KAAK,WAAW,GAAG;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CAAC;AA4HF,eAAO,MAAM,2BAA2B,EAAE,QAAQ,CAAC,WAAW,CAe7D,CAAC"}
@@ -0,0 +1,113 @@
1
+ import { randint } from "../../../../math/utils/random/randint.js";
2
+ import { round } from "../../../../math/utils/round.js";
3
+ import { shuffle } from "../../../../utils/alea/shuffle.js";
4
+ import { mdTable } from "../../../../utils/markdown/mdTable.js";
5
+ import { dollarize } from "../../../../utils/latex/dollarize.js";
6
+ import { addValidProp, propWhile, tryToAddWrongProp, } from "../../../exercise.js";
7
+ import { getDistinctQuestions } from "../../../utils/getDistinctQuestions.js";
8
+ import { numberVEA } from "../../../../exercises/vea/numberVEA.js";
9
+ import { operatorComposition } from "../../../../tree/utilities/operatorComposition.js";
10
+ import { AddNode } from "../../../../tree/nodes/operators/addNode.js";
11
+ import { multiply } from "../../../../tree/nodes/operators/multiplyNode.js";
12
+ import { frac } from "../../../../tree/nodes/operators/fractionNode.js";
13
+ const getHint = () => {
14
+ return `Multiplie chaque note par son coefficient, puis additionne les résultats obtenus, et divise le tout par la somme des coefficients.`;
15
+ };
16
+ const getCorrection = (identifiers) => {
17
+ const { randomEffectives, randomValues } = identifiers;
18
+ const sumEff = operatorComposition(AddNode, randomEffectives.map((e) => e.toTree()));
19
+ const sumProd = operatorComposition(AddNode, randomValues.map((e, i) => multiply(randomEffectives[i].toTree(), e.toTree())));
20
+ const fraction = frac(sumProd, sumEff);
21
+ return `La moyenne est égale à :
22
+
23
+ $$
24
+ ${fraction.toSimplificationTex()}
25
+ $$
26
+ `;
27
+ };
28
+ const getInstruction = ({ randomEffectives, randomValues, }) => {
29
+ return `Voici les notes en mathématiques d'un élève au premier trimestre :
30
+
31
+ ${mdTable([
32
+ ["Note sur $20$", ...randomValues.map((e) => dollarize(e))],
33
+ ["Coefficient", ...randomEffectives.map((e) => dollarize(e))],
34
+ ])}
35
+
36
+ Calculer la moyenne (arrondir au centième).`;
37
+ };
38
+ const getAnswer = (identifiers) => {
39
+ const { randomEffectives, randomValues } = identifiers;
40
+ let average = 0;
41
+ for (let i = 0; i < randomValues.length; i++)
42
+ average += randomValues[i] * randomEffectives[i];
43
+ const sumEffectives = randomEffectives.reduce((sum, value) => sum + value, 0);
44
+ average /= sumEffectives;
45
+ average = round(average, 2);
46
+ const answer = (average + "").replace(".", ",");
47
+ return answer;
48
+ };
49
+ const getAverageWithTableQuestion = () => {
50
+ const getRandomUniqueValues = (count, min, max) => {
51
+ let counter = 0;
52
+ const uniqueValues = new Set();
53
+ while (uniqueValues.size < count) {
54
+ counter++;
55
+ if (counter > 1000)
56
+ throw new Error("Too many iterations in averageWithTable");
57
+ uniqueValues.add(randint(min, max));
58
+ }
59
+ return Array.from(uniqueValues).sort((a, b) => a - b);
60
+ };
61
+ const randomValues = getRandomUniqueValues(4, 1, 20);
62
+ const randomEffectives = [1, 2, 3, 4].map(() => randint(1, 6));
63
+ const identifiers = { randomEffectives, randomValues };
64
+ return getQuestionFromIdentifiers(identifiers);
65
+ };
66
+ const getQuestionFromIdentifiers = (identifiers) => {
67
+ const question = {
68
+ instruction: getInstruction(identifiers),
69
+ answer: getAnswer(identifiers),
70
+ keys: [],
71
+ answerFormat: "tex",
72
+ identifiers,
73
+ style: {
74
+ tableOptions: {
75
+ firstColumnIsHeader: true,
76
+ firstCellIsDivided: false,
77
+ firstRowIsHeader: false,
78
+ },
79
+ },
80
+ hint: getHint(identifiers),
81
+ correction: getCorrection(identifiers),
82
+ };
83
+ return question;
84
+ };
85
+ const getPropositions = (n, { answer }) => {
86
+ const propositions = [];
87
+ addValidProp(propositions, answer);
88
+ const average = Number(answer.replace(",", "."));
89
+ propWhile(propositions, n, () => {
90
+ tryToAddWrongProp(propositions, round(average + randint(-average, 20 - average, [0]) + randint(1, 100) / 100, 2)
91
+ .toString()
92
+ .replace(".", ","));
93
+ });
94
+ return shuffle(propositions);
95
+ };
96
+ const isAnswerValid = (ans, { answer }) => {
97
+ return numberVEA(ans, answer);
98
+ };
99
+ export const averageWithTableWithContext = {
100
+ id: "averageWithTableWithContext",
101
+ connector: "=",
102
+ label: "Calcul de la moyenne de notes coefficientées",
103
+ isSingleStep: false,
104
+ generator: (nb) => getDistinctQuestions(getAverageWithTableQuestion, nb),
105
+ qcmTimer: 60,
106
+ freeTimer: 60,
107
+ getPropositions,
108
+ isAnswerValid,
109
+ subject: "Mathématiques",
110
+ getQuestionFromIdentifiers,
111
+ hasHintAndCorrection: true,
112
+ shouldHaveCalculator: true,
113
+ };
@@ -21,4 +21,6 @@ export * from "./getQuartileProportionQuestion.js";
21
21
  export * from "./interpretIndicatorsForLists.js";
22
22
  export * from "./plausibilityOfAverage.js";
23
23
  export * from "./etendueTable.js";
24
+ export * from "./averageWithClasses.js";
25
+ export * from "./averageWithTableWithContext.js";
24
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/exercises/math/probaStat/stats1var/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oBAAoB,CAAC;AACnC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC"}
@@ -21,3 +21,5 @@ export * from "./getQuartileProportionQuestion.js";
21
21
  export * from "./interpretIndicatorsForLists.js";
22
22
  export * from "./plausibilityOfAverage.js";
23
23
  export * from "./etendueTable.js";
24
+ export * from "./averageWithClasses.js";
25
+ export * from "./averageWithTableWithContext.js";
@@ -70,7 +70,7 @@ const getMedianList = (optsIn) => {
70
70
  const arrayedOptions = optsIn;
71
71
  const opts = {
72
72
  nbValues: random(arrayedOptions.nbValues ?? optsDefault.nbValues),
73
- isOrdered: optsIn?.isOrdered ?? true,
73
+ isOrdered: optsIn?.isOrdered ?? false,
74
74
  };
75
75
  const length = Number(opts.nbValues);
76
76
  const randomValues = [...Array(length).keys()].map(() => randint(1, 20));
@@ -123,9 +123,9 @@ const options = [
123
123
  },
124
124
  ];
125
125
  export const medianWithList = {
126
- id: "medianWithList",
126
+ id: "medianWithListOrdered",
127
127
  connector: "=",
128
- label: "Calcul de la médiane d'une liste de valeurs",
128
+ label: "Calcul de la médiane d'une liste de valeurs ordonnée",
129
129
  isSingleStep: false,
130
130
  generator: (nb, opts) => getDistinctQuestions(() => getMedianList(Object.assign({}, opts, { isOrdered: true })), nb),
131
131
  options,
@@ -138,7 +138,7 @@ export const medianWithList = {
138
138
  hasHintAndCorrection: true,
139
139
  };
140
140
  export const medianWithListUnorderedVariant = {
141
- id: "medianWithListUnorderedVariant",
141
+ id: "medianWithList",
142
142
  connector: "=",
143
143
  label: "Calcul de la médiane d'une liste de valeurs non ordonnée",
144
144
  isSingleStep: false,
@@ -12,4 +12,7 @@ export * from "./scratchStringLoopCond.js";
12
12
  export * from "./scratchStringLoopCond2.js";
13
13
  export * from "./scratchStringLoopCond3.js";
14
14
  export * from "./scratchCond1.js";
15
+ export * from "./scratchListElemAtIndex.js";
16
+ export * from "./scratchListElemAtIndex2.js";
17
+ export * from "./scratchListFilter.js";
15
18
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/scratch/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/scratch/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAElC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC"}
@@ -13,3 +13,6 @@ export * from "./scratchStringLoopCond2.js";
13
13
  export * from "./scratchStringLoopCond3.js";
14
14
  export * from "./scratchCond1.js";
15
15
  // export * from "./scratchFunction1.js";
16
+ export * from "./scratchListElemAtIndex.js";
17
+ export * from "./scratchListElemAtIndex2.js";
18
+ export * from "./scratchListFilter.js";
@@ -0,0 +1,13 @@
1
+ import { Exercise } from "../../../exercises/exercise.js";
2
+ type Insertion<T> = {
3
+ index: number;
4
+ value: T;
5
+ };
6
+ type Identifiers = {
7
+ isUsingLetters: boolean;
8
+ arrInsertion: Insertion<number>[] | Insertion<string>[];
9
+ indexAsked: number;
10
+ };
11
+ export declare const scratchListElemAtIndex: Exercise<Identifiers>;
12
+ export {};
13
+ //# sourceMappingURL=scratchListElemAtIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scratchListElemAtIndex.d.ts","sourceRoot":"","sources":["../../../../src/exercises/math/scratch/scratchListElemAtIndex.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAaT,MAAM,6BAA6B,CAAC;AAQrC,KAAK,SAAS,CAAC,CAAC,IAAI;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;IACxD,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AA0MF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,WAAW,CAkBxD,CAAC"}