>>> for y in range(2,N):
... for x in range(2,y):
... if y%x == 0:
Do not understand " y%x "
This is not a software error and I think this could be solved pretty quickly with a google search!
This is a modulus in python and returns the remainder of a division. Your code is saying if y/x has no remainder, do something.
a quick example of modulus:
3%1 returns 0 because 3/1 has no remainder, 3 is divisible by 1.
3%2 returns 1 because 3/2 has a remainder of 1.
This is not a bioinformatics-related question!
Hint: Try to Google modulus operator in Python.
We believe that this post does not fit the main topic of this site.
Hints already provided in comments.
For this reason we have closed your question. This allows us to keep the site focused
on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.