Let us consider the following example :
n=int(raw_input('Enter an integer n= '))
L=range(n)
V=[]
for i in L:
print i
for j in L:
if (j!=i) and (i==(n*j)%n or j==(n*i)%n)
V.append((i,j))
The elements of M should like the form M=[(i,j),...]
The above code gave me errors. How can I fix this.
Aucun commentaire:
Enregistrer un commentaire