Skip to content

Commit

Permalink
Separate to own module
Browse files Browse the repository at this point in the history
  • Loading branch information
timofurrer committed Apr 13, 2018
1 parent ef5d5d4 commit 40aa709
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
14 changes: 1 addition & 13 deletions calculator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1 @@
class Calculator(object):

def add(self, a, b):
return a + b

def sub(self, x,y):
return a - b

def multiply(self, x,y):
return a * b

def divide(self, x,y):
return a / b
from .core import Calculator
13 changes: 13 additions & 0 deletions calculator/core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class Calculator(object):

def add(self, a, b):
return a + b

def sub(self, a, b):
return a - b

def multiply(self, a, b):
return a * b

def divide(self, a, b):
return a / b

0 comments on commit 40aa709

Please sign in to comment.