I have following snippet which finds numbers which are not coprime to 20. But, I want to achieve the opposite, i.e., printing the coprime numbers of 20. It should be achieved with something like (((i%j)!==0) & ((z%j)!==0)). I am new to Python and hence not sure why this was not working. Can someone edit the code so that it prints the coprime numbers of 20 which are in the range 3 to 31? #Finding coprime of a number (e.g.20) k=0 z=20 for i in range(3,31): for j in range(2,30): if(((i%j)==0) & ((z%j)==0)): k=k+1 if(k==1): print(i) #the printed number is not co prime to 20 k=0 Following is the output of the code snippet: 4 5 6 8 10 12 14 15 16 18 20 22 24 25 26 28 30 My desired output is: 3 7 9 11 13 17 19 21 23 27 29 Continue reading...