math-exercises 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { randint } from "../../mathutils/random/randint";
|
|
2
|
-
import { Integer } from "../../numbers/integer/integer";
|
|
3
|
-
import { DiscreteSet } from "../../sets/discreteSet";
|
|
4
|
-
import { Interval } from "../../sets/intervals/intervals";
|
|
5
2
|
import { latexParse } from "../../tree/latexParser/latexParse";
|
|
6
3
|
import { Node } from "../../tree/nodes/node";
|
|
7
4
|
import { NumberNode } from "../../tree/nodes/numbers/numberNode";
|
|
@@ -53,9 +50,6 @@ export function getPriorityQuestions(): Question {
|
|
|
53
50
|
new NumberNode(d)
|
|
54
51
|
);
|
|
55
52
|
answer = (a * b + c + d).toString();
|
|
56
|
-
console.log("type", type);
|
|
57
|
-
console.log("statement", statement);
|
|
58
|
-
console.log("answer", answer);
|
|
59
53
|
break;
|
|
60
54
|
case 2: // a/b ±c±d
|
|
61
55
|
[b, c, d] = [1, 2, 3].map((el) => randint(-10, 11, [0]));
|
|
@@ -72,9 +66,6 @@ export function getPriorityQuestions(): Question {
|
|
|
72
66
|
new NumberNode(d)
|
|
73
67
|
);
|
|
74
68
|
answer = (a / b + c + d).toString();
|
|
75
|
-
console.log("type", type);
|
|
76
|
-
console.log("statement", statement);
|
|
77
|
-
console.log("answer", answer);
|
|
78
69
|
break;
|
|
79
70
|
case 3: // a*b ± c*d
|
|
80
71
|
[a, b, c, d] = [1, 2, 3, 4].map((el) => randint(-10, 11));
|
|
@@ -83,9 +74,6 @@ export function getPriorityQuestions(): Question {
|
|
|
83
74
|
new MultiplyNode(new NumberNode(c), new NumberNode(d))
|
|
84
75
|
);
|
|
85
76
|
answer = (a * b + c * d).toString();
|
|
86
|
-
console.log("type", type);
|
|
87
|
-
console.log("statement", statement);
|
|
88
|
-
console.log("answer", answer);
|
|
89
77
|
break;
|
|
90
78
|
case 4: // a*b ± c/d
|
|
91
79
|
[a, b] = [1, 2].map((el) => randint(-10, 11));
|
|
@@ -96,9 +84,6 @@ export function getPriorityQuestions(): Question {
|
|
|
96
84
|
new DivideNode(new NumberNode(c), new NumberNode(d))
|
|
97
85
|
).shuffle();
|
|
98
86
|
answer = (a * b + c / d).toString();
|
|
99
|
-
console.log("type", type);
|
|
100
|
-
console.log("statement", statement);
|
|
101
|
-
console.log("answer", answer);
|
|
102
87
|
break;
|
|
103
88
|
case 5: // a/b ± c/d
|
|
104
89
|
[b, d] = [1, 2].map((el) => randint(-10, 11, [0]));
|
|
@@ -109,9 +94,6 @@ export function getPriorityQuestions(): Question {
|
|
|
109
94
|
new DivideNode(new NumberNode(c), new NumberNode(d))
|
|
110
95
|
);
|
|
111
96
|
answer = (a / b + c / d).toString();
|
|
112
|
-
console.log("type", type);
|
|
113
|
-
console.log("statement", statement);
|
|
114
|
-
console.log("answer", answer);
|
|
115
97
|
break;
|
|
116
98
|
case 5: // a*b*c ± d
|
|
117
99
|
[b, d] = [1, 2].map((el) => randint(-10, 11, [0]));
|
|
@@ -121,10 +103,7 @@ export function getPriorityQuestions(): Question {
|
|
|
121
103
|
new MultiplyNode(new MultiplyNode(new NumberNode(a), new NumberNode(b)), new NumberNode(c)),
|
|
122
104
|
new NumberNode(d)
|
|
123
105
|
).shuffle();
|
|
124
|
-
answer = a * b * c + d
|
|
125
|
-
console.log("type", type);
|
|
126
|
-
console.log("statement", statement.toString());
|
|
127
|
-
console.log("answer", answer);
|
|
106
|
+
answer = (a * b * c + d).toString();
|
|
128
107
|
break;
|
|
129
108
|
}
|
|
130
109
|
|