Sure, how far have you got and where are you stuck? Post your code so far.
If you know how to determine if a number is prime, then that algorithm can be fairly easily converted into code. You could start by just writing down the steps for determining primeness, then modify it if necessary to look more like a program, then start converting each step of the algorithm into one or more lines of code.

BTW, if "help me" means "write the code for me", the answer is no. You must work through this yourself; it's the only way to learn programming.