-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
676df08
commit 0c317da
Showing
8 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/lambda_functions/calculator_function/operations/add_operation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class AddOperation: | ||
def execute(self, first_number, second_number): | ||
if first_number is None or second_number is None: | ||
raise ValueError("Both numbers are required for this operation.") | ||
raise ValueError("Both numbers are required") | ||
return first_number + second_number |
2 changes: 1 addition & 1 deletion
2
src/lambda_functions/calculator_function/operations/divide_operation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
class DivideOperation: | ||
def execute(self, first_number, second_number): | ||
if first_number is None or second_number is None: | ||
raise ValueError("Both numbers are required for this operation.") | ||
raise ValueError("Both numbers are required") | ||
if second_number == 0: | ||
raise ValueError("Division by zero is not allowed") | ||
return first_number / second_number |
2 changes: 1 addition & 1 deletion
2
src/lambda_functions/calculator_function/operations/multiply_operation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class MultiplyOperation: | ||
def execute(self, first_number, second_number): | ||
if first_number is None or second_number is None: | ||
raise ValueError("Both numbers are required for this operation.") | ||
raise ValueError("Both numbers are required") | ||
return first_number * second_number |
2 changes: 1 addition & 1 deletion
2
src/lambda_functions/calculator_function/operations/subtract_operation.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class SubtractOperation: | ||
def execute(self, first_number, second_number): | ||
if first_number is None or second_number is None: | ||
raise ValueError("Both numbers are required for this operation.") | ||
raise ValueError("Both numbers are required") | ||
return first_number - second_number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters