-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
Create Quadratic Equations(Complexes Numbers) #941
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
Conversation
Created function that solves quadratic equations treating the cases with complexes numbers. Giving an answer with the imaginary unit "i".
for a*x*x + b*x + c. | ||
Ex.: a = 1, b = 3, c = -4 | ||
Solution1 = 1 and Solution2 = -4 | ||
""" |
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.
Awesome. Please consider adding these two doctests at the end of this function's docstring:
>>> QuadraticEquation(a=1, b=3, c=-4)
The equation solutions are: 1.0 and -4.0
>>> QuadraticEquation(5, 6, 1)
The equation solutions are: -0.2 and -1.0
Our automated testing can then run the first line and raise an error if the result does not match the second line.
@PatOnTheBack Instead of a 👍 could I please ask you to Review changes because that will give project maintainers more confidence that you has read through the actual changes and believe that those changes will improve the state of our project? Anyone can review a GitHub pull request:
Thanks for taking the time to go through these extra steps which should help project maintainers. |
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.
This looks fine. Thank you for your pull request!🤩
@AugustofCravo Can you please work on getting the tests to pass so that we can merge? |
Since there was no response from the owner of this PR, I made this little change which I hope will solve the issue!
@@ -1,3 +1,4 @@ | |||
from __future__ import print_function |
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.
@harshildarji This repo no longer supports legacy Python so we should avoid adding those __future__
imports which are no longer relevant in Python 3. Adding them give the impression that we tested these scripts on legacy Python which we do not do.
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.
@cclauss Looking at the failure logs, I thought this could solve the issue. My bad! I'll remove it and see if it still gives the error!
Thanks!
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.
The problem may be that the filename contains spaces and uppercase characters so validate_filenames will fail.
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.
* Create Quadratic Equations(Complexes Numbers) Created function that solves quadratic equations treating the cases with complexes numbers. Giving an answer with the imaginary unit "i". * Update Quadratic Equations(Complexes Numbers) Since there was no response from the owner of this PR, I made this little change which I hope will solve the issue!
Created function that solves quadratic equations treating the cases with complexes numbers. Giving an answer with the imaginary unit "i".