# Replacing all primes with 0 [closed]

I am attempting to utilise the Condition function to replace all primes in the list by a 0.

Here are my codes:

Range[2000] /. x_ /; x \[Element] Prime -> 0


But it isn't performing as it should and I am unable to conceive an alternative syntax.

## closed as off-topic by Szabolcs, gwr, b.gates.you.know.what, Simon Woods, J. M. will be back soon♦Mar 26 '17 at 14:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Szabolcs, gwr, b.gates.you.know.what, Simon Woods, J. M. will be back soon
If this question can be reworded to fit the rules in the help center, please edit the question.

• Range[2000] /. x_ /; PrimeQ[x] -> 0 – andre314 Mar 26 '17 at 13:04
• Range[2000] /. x_?PrimeQ :> 0also – ubpdqn Mar 26 '17 at 13:05
• That should be Primes, not Prime. Prime is a function. Primes is a set. – Szabolcs Mar 26 '17 at 13:12
• @Szabolcs Thank you for the heads up. – Physkid Mar 27 '17 at 9:51