* DO NOT DELETE THE “J” *
It represents the imaginary part of the solution, and is very important to keep in the program
I was never taught that in Algebra class.
The imaginary part is actually represented as i
, but Python has a reason (which I forget) for changing it to j
Oh, it’s i
. Then use .replace('j', 'i')
in the print
statement.
Use .replace()
to get rid of the parentheses too
Quadratic equations are in the form of ax^2 + bx + c = 0.
Another common form is a(x - k)^2 + h
(turning point form). Quadratic equations do not necessarily have to be in ‘expanded’ form.
Not to argue but genuinely curious, what difference does it make?
It indicates that you’ve taken an even root of a negative number ie the square root of -4
which could be said to be 2i
. It cannot just be -2
, since -2 * -2 = 4
, not -4
. Hence the reason to invent imaginary numbers; i
represents the square root of -1
, or a theoretical number that when multiplied by itself, equals -1
. This enables us to perform many useful calculations; for example (and I have no idea how it works or anything, but) computer generated water is supposedly only possible using imaginary numbers.
I know about imaginary numbers. I was wondering why I needed to use replace
instead of strip
.
What does that mean?
Hmm… that is rather unclear lol, I don’t mean water literally created by a computer, that is impossible (at least right now… as far as I’m aware…), I mean computer generated graphics to simulate water, there’s all the physics, then the rendering and understanding how light interacts etc…
I understood quadratic equations on GeeksforGeeks, but I just used the understanding and I made the code.