CoCalc Public Fileslattice.ipynbOpen with one click!
Author: Catherine Cui
Views : 48
Compute Environment: Ubuntu 20.04 (Default)
In [11]:
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)
In [51]:
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
In [29]:
if 1.2.is_integer == False: print("hello")
In [47]:
index = 1 index = index + 1 print(index)
2
In [ ]: