Jump to content

santiagoesc

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by santiagoesc

  1. Im trying to put a stored value inside the range of a "for" loop, and I don't know if that's permitted, an example would be:

    M = np.array([[8,8,8,8],
                            [8,8,8,8],
                            [8,8,8,8],
                            [8,8,8,8]])

    for j in range (4):
        for i in range(4):
            for k in range(2,M[i,j]):
                if M[i,j] % k == 0:
                    print("yes")

                else

                    print("no")
     

×
×
  • Create New...