Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

looping of equality function

Hi, I have the equation x^4+y^4=z^3. I want to run each variable from -100 till 100 to see which numbers satisfy this equation. Here is what I have done:

x,y,z= var('x y z')
for x in range(-100, 100):
     for y in range(-100, 100):
           for z in range(-100, 100):
x^4+y^4==z^3
print(x,y,z)

There is definitely something wrong with the coding that's not giving me the desired answer. Can someone enlighten me, please.