Ok so I am new to programming.. like rly new. I took a class to learn python and I'm already finding this to be a pain xD
Trying to write a code that can calculate the root of a polynomial. So I start with this code, and I get the error TypeError: unsupported operand type(s) for +: 'int' and 'tuple' for the 4th and the 5th line. I just have no idea whats being identified as a tuple.
a,b,c = 2,5,2 #coefficients
r = b**2-4ac
rr = r**0,5 #squareroot of r
x1 = (-b+rr) / (2*a) #first root
x2 = (-b-rr) / (2*a) #second root
print(x1)
print(x2)
And try to dumb down your answers as much as possible, I rly dont know anything about programming as I'm only in week 1 of my class.
Thx a lot!