1 | initial version |
You need a colon:
if (v==0): f.factor()
I would actually write this as:
if f.is_irreducible():
f.factor()
Your assignment of v=f.is_irreducible()
doesn't seem to be necessary unless you want to use v
several times later. If so, you could do
v = f.is_irreducible()
if not v: # better than checking v == 0
f.factor()
2 | No.2 Revision |
You need a colon:
if (v==0): f.factor()
I would actually write this as:
if not f.is_irreducible():
f.factor()
Your assignment of v=f.is_irreducible()
doesn't seem to be necessary unless you want to use v
several times later. If so, you could do
v = f.is_irreducible()
if not v: # better than checking v == 0
f.factor()