| Hosted by CoCalc | Download
Kernel: SageMath 9.3
def lattice(theta): index = 1 y = tan(theta) while not (y * index).is_integer(): print(y.is_integer()) index = index + 1 return (index, y*index)
f = -x p=[] for i in range(0,10): p.append(plot(f + i,(x,0,10))) p.append(plot(i, (x, 0, 10))) sum(p)
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-51-adfca80a1920> in <module> 4 p.append(plot(f + i,(x,Integer(0),Integer(10)))) 5 p.append(plot(i, (x, Integer(0), Integer(10)))) ----> 6 p.append(plot(line[(i, Integer(2)), (i, -Integer(2))])) 7 sum(p) TypeError: 'function' object is not subscriptable
if 1.2.is_integer == False: print("hello")
index = 1 index = index + 1 print(index)
2