Sopra Steria interview question

Prime number code with java or python Pyramid code