Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ def divide(x, y):
if y == 0:
return 'Cannot divide by 0'
return x * 1.0 / y

def zero(x, y):
return 0 + x + y - x + 2 * x + 3 * y
Comment on lines +18 to +19
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function has an indentation issue. Based on the class structure, this should be a method of the Calculator class and needs proper indentation to align with other methods. Also, it's missing the self parameter that's required for instance methods.

Suggested change
def zero(x, y):
return 0 + x + y - x + 2 * x + 3 * y
def zero(self, x, y):
return 0 + x + y - x + 2 * x + 3 * y

Did we get this right? 👍 / 👎 to inform future reviews.