ArithFunct/SaurinK | ArithFunct/Bernard04 | ||||
---|---|---|---|---|---|
n | 1 | def ADD(f, g): | n | 1 | def ADD(a, b): |
2 | def answer(x): | 2 | def h(x): | ||
3 | if callable(f): | 3 | if callable(a): | ||
4 | ff = f(x) | 4 | c = a(x) | ||
5 | else: | 5 | else: | ||
n | 6 | ff = f | n | 6 | c = a |
7 | |||||
7 | if callable(g): | 8 | if callable(b): | ||
8 | gg = g(x) | 9 | d = b(x) | ||
9 | else: | 10 | else: | ||
n | 10 | gg = g | n | 11 | d = b |
11 | return ff + gg | ||||
12 | 12 | ||||
n | n | 13 | return c + d | ||
14 | |||||
13 | return answer | 15 | return h | ||
14 | 16 | ||||
15 | 17 | ||||
n | 16 | def SUB(f, g): | n | 18 | def SUB(a, b): |
17 | def answer(x): | 19 | def h(x): | ||
18 | if callable(f): | 20 | if callable(a): | ||
19 | ff = f(x) | 21 | c = a(x) | ||
20 | else: | 22 | else: | ||
n | 21 | ff = f | n | 23 | c = a |
24 | |||||
22 | if callable(g): | 25 | if callable(b): | ||
23 | gg = g(x) | 26 | d = b(x) | ||
24 | else: | 27 | else: | ||
n | 25 | gg = g | n | 28 | d = b |
26 | return ff - gg | ||||
27 | 29 | ||||
n | n | 30 | return c - d | ||
31 | |||||
28 | return answer | 32 | return h | ||
29 | 33 | ||||
30 | 34 | ||||
n | 31 | def DIV(f, g): | n | 35 | def MUL(a, b): |
32 | def answer(x): | 36 | def h(x): | ||
33 | if callable(f): | 37 | if callable(a): | ||
34 | ff = f(x) | 38 | c = a(x) | ||
35 | else: | 39 | else: | ||
n | 36 | ff = f | n | 40 | c = a |
41 | |||||
37 | if callable(g): | 42 | if callable(b): | ||
38 | gg = g(x) | 43 | d = b(x) | ||
39 | else: | 44 | else: | ||
n | 40 | gg = g | n | 45 | d = b |
41 | return ff / gg | ||||
42 | 46 | ||||
n | n | 47 | return c * d | ||
48 | |||||
43 | return answer | 49 | return h | ||
44 | 50 | ||||
45 | 51 | ||||
n | 46 | def MUL(f, g): | n | 52 | def DIV(a, b): |
47 | def answer(x): | 53 | def h(x): | ||
48 | if callable(f): | 54 | if callable(a): | ||
49 | ff = f(x) | 55 | c = a(x) | ||
50 | else: | 56 | else: | ||
n | 51 | ff = f | n | 57 | c = a |
58 | |||||
52 | if callable(g): | 59 | if callable(b): | ||
53 | gg = g(x) | 60 | d = b(x) | ||
54 | else: | 61 | else: | ||
n | 55 | gg = g | n | 62 | d = b |
56 | return ff * gg | ||||
57 | 63 | ||||
n | 58 | return answer | n | 64 | return c / d |
59 | 65 | ||||
t | t | 66 | return h | ||
67 |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|