-
Notifications
You must be signed in to change notification settings - Fork 0
Update calculator.py #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,3 +20,7 @@ def multiplyBy6(x, y): | |||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| def multiplyBy62(x, y): | ||||||||||||||||||||||||||||||||||
| return x * y * 12412 | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| def multiplyBy622(x, y): | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function name
Suggested change
Did we get this right? 👍 / 👎 to inform future reviews. |
||||||||||||||||||||||||||||||||||
| return x * y * 12412 | ||||||||||||||||||||||||||||||||||
seer-by-sentry[bot] marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+24
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function is a duplicate of Did we get this right? 👍 / 👎 to inform future reviews. |
||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code duplication detected: The new function
multiplyBy622has identical logic to the existingmultiplyBy62function (both returnx * y * 12412). This violates the DRY (Don't Repeat Yourself) principle. Either remove the duplicate function or, if intended, refactor to eliminate code duplication using a shared implementation or by removing one of them.Did we get this right? 👍 / 👎 to inform future reviews.