Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

AttributeError: 'int' object has no attribute 'mod'

Hello,

How can I solve the problem with an error message: "AttributeError: 'int' object has no attribute 'mod'" when executing the following program?

maxdeg = 5 maxord = maxdeg for m in range(maxord + 1): for l in range(m, maxdeg + 1): print l, m, gen_legendre_P(l, m, z), l.mod(2).is_zero()

Sincerely, KKondo

AttributeError: 'int' object has no attribute 'mod'

Hello,

How can I solve the problem with an error message: "AttributeError: 'int' object has no attribute 'mod'" when executing the following program?

maxdeg = 5
maxord = maxdeg
for m in range(maxord + 1):
    for l in range(m, maxdeg + 1):
        print l, m, gen_legendre_P(l, m, z), l.mod(2).is_zero()

z) # this uses "l.mod(2).is_zero()."

Sincerely, KKondo