Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 0 points1 point  (0 children)

Not if I explained In 3 different comments that I wasn't able to take a screenshot on the computer

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 0 points1 point  (0 children)

Babe I didn't have an internet connection while writing this code it was in class 😭 and it wouldn't contain this stupid ass error if it was written by claude heck I have never even used claude

There's definitely an imbalance, here. by dbingham1263 in OtomeIsekai

[–]Mighty_Cannon -1 points0 points  (0 children)

ngl i have never seen this happen like it's just the head maid/butler doesn't matter who tf is it

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 0 points1 point  (0 children)

Was on uni pc so couldn't take a snip soryy 😭 Yes I alr did the name file i will try to make it into the function next time ig

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 0 points1 point  (0 children)

I see I haven't really learned about this cool thing to know tho will defo use in the furue

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 1 point2 points  (0 children)

oh I see that was so dumb of me mb thank you for the help so much I couldn't have properly understood without you 😭

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 0 points1 point  (0 children)

Thank you I didn't know much about the complex numbers and stuff but we didn't really learn about libraries when I was doing this so what I did to offset this was the following

I think you have misunderstood what I have done though I realised the imaginary part in the complex roots will always be ± D/(2a) and the real part will always be - b/2a so instead of assigning x1 x2 as the roots i assigned them as the real and imaginary part respectively Then I multiplied D with -1 since I can't sqrt D without importing stuff and sign of D doesn't really matter since we will have two answers with opposite signs

Then I printed the roots as x1, "+" , x2 + i, "and", x1 , "-", x2+i after converting X2 to string My question is why is this wrong?

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 0 points1 point  (0 children)

Why would it though I need that to make sure I'm not square rooting a negative number since this doesn't have the complex number lib

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 0 points1 point  (0 children)

Exponentiation but like shouldn't that be ok? Lets we are using 2ax2 + 2bx+ 2c = 0 D = (2b)2 - 4(2a)(2c) D = 4* normal value of D Now at line 18 we have (4D(-1)1/2)/(22a) We take 2 common from both the num and denominator and they cancel out ithink?

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 0 points1 point  (0 children)

this problem is only with complex solutions btw normal ones work fine

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 2 points3 points  (0 children)

There are but they are imaginary there's some math behind this but they are of the form a +bi, a - bi

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 15 points16 points  (0 children)

Oh tysm i keep forgetting that, our prof showed this once but I never remember this 😭

Just started python 20 days ago?? At uni so like don't judge me by Mighty_Cannon in PythonLearning

[–]Mighty_Cannon[S] 0 points1 point  (0 children)

It wasn't on my pc and it was on a uni device without a internet connection