diff --git a/calculator.py b/calculator.py new file mode 100644 index 00000000..ef944f44 --- /dev/null +++ b/calculator.py @@ -0,0 +1,14 @@ +class Calculator: + def add(self, a, b): + return a + b + + def subtract(self, a, b): + return a - b + + def multiply(self, a, b): + return a * b + + def divide(self, a, b): + if b == 0: + raise ValueError("Cannot divide by zero.") + return a / b \ No newline at end of file diff --git a/hello.py b/hello.py new file mode 100644 index 00000000..e69de29b