+ 1
What is the steps to make python solve (x + 2)**3 ?
8 Respuestas
+ 2
Define x first and then solve.
+ 2
you just define the x? I can't seem the crasp the problem here.
def solver(x):
answer = (x + 2) ** 3
print(answer)
solver(1)
output is 27 , simple math
+ 2
right, I see, you want to expand the polynomial
+ 1
I want it to make (x + 2)**3 into x**3 + 6*x**2 + 12*x + 8
0
what do you mean?
0
if u need result y of the first function to be the next x you can reuse the code i posted above.
if this is not the case you need to give alot! more information on what you are trying to achieve
0
I'm trying to expand the polynomial, as Amaras A. just said. Like: (a + b)**2 = a**2 + 2*a*b + b**2
0
ok, so, I have a polynomial code, but I have not yet implemented the code for exponentiation...