We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3a2393 commit 2ae5a06Copy full SHA for 2ae5a06
1 file changed
source-code/command-line-arguments/Fire/calculations.py
@@ -1,14 +1,17 @@
1
-def add(x, y):
+def add(x: float, y: float) -> float:
2
return x + y
3
4
-def sub(x, y):
+def sub(x: float, y: float) -> float:
5
return x - y
6
7
-def mult(x, y):
+def mult(x: float, y: float) -> float:
8
return x*y
9
10
-def div(x, y):
+def div(x: float, y: float) -> float:
11
return x/y
12
13
-def mod(x, y):
+def idiv(x: int, y: int) -> int:
14
+ return x//y
15
+
16
+def mod(x: int, y: int) -> int:
17
return x % y
0 commit comments