if loop not working
I have to use an if loop in my program. I am checking the irreducibility of a collection of polynomials. If f(x) is a reducible polynomial, then I want to find its factor. This is my code
v=f.is_irreducible()
if (v==0) f.factor()
But I am getting a syntax error. Can someone help me ?