| 1 | initial version |
First of all, there is a function to check if a polynomial is a square
sage: x = polygen(GF(7))
sage: p = 2*x^2 + 6*x + 1
sage: p.is_square()
True
Then you need to learn about conditional statements in Python (if/elif/else): https://docs.python.org/3/tutorial/controlflow.html
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.