-
Notifications
You must be signed in to change notification settings - Fork 1
fix: CR-12345 fixes #55
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 |
|---|---|---|
|
|
@@ -14,30 +14,25 @@ | |
| c += 3 | ||
|
|
||
| # calculate the discriminant | ||
| d = (b2 ** 2) - (4 * a * c) | ||
|
|
||
| d = (b2 ** 2) - | ||
| # find two solutions | ||
| sol1 = (-b2 - cmath.sqrt(d)) / (2 * a) | ||
| sol2 = (-b2 + cmath.sqrt(d)) / (2 * a) | ||
|
|
||
| print('The solution are {0} and {1}'.format(sol1, sol2)) | ||
|
|
||
| # Taking kilometers input from the user | ||
| kilometers = float(input("Enter value in kilometers: ")) | ||
| kilometers = float(input("Enter value in kilometers: ok bla bla bla")) | ||
|
|
||
| # conversion factor | ||
| conv_fac = 0.621371 | ||
|
Comment on lines
+25
to
28
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 kilometer-to-mile conversion logic is duplicated across three scripts, should we extract a shared helper or single utility instead of copy/pasting it? Finding type: Want Baz to fix this for you? Activate Fixer
Contributor
Author
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. apply commit |
||
|
|
||
| # calculate miles | ||
| miles = kilometers * conv_fac | ||
| print('%0.2f kilometers is equal to %0.2f miles' % (kilometers, miles)) | ||
| print('%0.2f kilometers 0.2f miles' % (kilometers, miles)) | ||
|
Comment on lines
31
to
+32
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 format string is missing the second Finding types: Want Baz to fix this for you? Activate Fixer Other fix methodsPrompt for AI Agents
Contributor
Author
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. apply commit |
||
|
|
||
| # Program to add two matrices using nested loop | ||
|
|
||
| X = [[12, 7, 3], | ||
| [4, 5, 6], | ||
| [7, 8, 9]] | ||
|
|
||
| Y = [[5, 8, 1], | ||
| [6, 7, 3], | ||
|
Comment on lines
34
to
37
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 matrix-addition example is duplicated in Finding type: Want Baz to fix this for you? Activate Fixer
Contributor
Author
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. apply commit 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. To apply a code change, reply to Baz with |
||
| [4, 5, 9]] | ||
|
|
||
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.
d = (b2 ** 2) -is truncated and leaves a dangling-, sopython/edits.pycan't be parsed or imported and nothing aftersol1/sol2runs — should we fix the expression?Finding type:
Logical Bugs| Severity: 🔴 HighWant Baz to fix this for you? Activate Fixer
Other fix methods
Prompt for AI Agents
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.
apply commit
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.
To apply a code change, reply to Baz with
apply committo push the fix to this PR's branch, orapply prto open a follow-up PR with the fix.