ほとんど説教やん。

300までの素数を求めるコードです(Python)。
https://ideone.com/w8bF0o

素数を小さいものから順に100個求めるコードです。
https://ideone.com/77o7YO