Skip to content

Commit 6d0ff70

Browse files
committed
Clean up calculator example
1 parent 53b5e09 commit 6d0ff70

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def add(x, y):
2+
return x + y
3+
4+
def sub(x, y):
5+
return x - y
6+
7+
def mult(x, y):
8+
return x*y
9+
10+
def div(x, y):
11+
return x/y
12+
13+
def mod(x, y):
14+
return x % y
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
#!/usr/bin/env python
22
import fire
3-
4-
5-
def add(x, y):
6-
return x + y
7-
8-
def mult(x, y):
9-
return x*y
3+
import calculations
104

115

126
if __name__ == '__main__':
13-
fire.Fire()
7+
fire.Fire(calculations)

0 commit comments

Comments
 (0)