Using python in math
<p>Ok so i want to solve this equation through python but cant figure out what to do! I tried using for loops but that didn't work so well</p>

<p>Im new to python so can anyone suggest what I should do</p>

<pre><code>RWBG-(WBR^2)-WBR-(BR^3)-(3BR^2)+2BR-(R^3)-(6R^2)+11R-6 = 0
</code></pre>

<p>R,W,B,G are different variables</p>

<pre><code>for i in range(100):
    R == i
for i in range(100):
    W == i
for i in range(100):
    B == i
for i in range(100):
    G == i

if R*W*B*G-W*B*R**2-W*B*R-B*R**3-3*B*R**2+2*B*R-R**3-6*R**2+11*R-6 == 0:
    print(R)
    print(W)
    print(B)
    print(G)
</code></pre>

<p>Ive tried this but it isnt successful </p>

<p>Assuming each letter is a variable, and that you simply want to evaluate the expression, an easy Python script would be:</p>

<pre><code>def equation (R,W,B,G,R):
    return R*W*B*G - W*B*(R**2) - W*B*R - B(R**3) - 3*B*(R**2) + 2*B*R - R**3 - 6*(R**2) + 11*R - 6
</code></pre>

python math equation polynomials quadratic