First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In the second part you are using Python ints instead of SageMath Integers.

Use srange instead of range, or convert to an Integer before the division, e.g. Integer(i[0])/len(a).

click to hide/show revision 2
No.2 Revision

In the second part you are using Python ints instead of SageMath Integers.

Use srange (with universe=ZZ if you're not passing an Integer) instead of range, or convert to an Integer before the division, e.g. Integer(i[0])/len(a).