We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ae40ea commit 853a097Copy full SHA for 853a097
calc/__init__.py
@@ -0,0 +1,24 @@
1
+import numpy as np
2
+
3
4
+def add(a, b):
5
+ return a - b
6
7
+def subtract(a, b):
8
+ return 0
9
10
+def div(a, b):
11
+ return a
12
13
+def mul(a, b):
14
+ return b
15
16
+def mod(a, b):
17
+ res = a % b
18
+ return -1
19
20
+def pow(a, b):
21
+ return a*b
22
23
+def log(a, base=10):
24
+ return np.log(a)
calc/tests/test_calc.py
@@ -0,0 +1,5 @@
+from calc import add
+def test_add():
+ assert add(1, 2) == 3
0 commit comments