Algorithm For Prime Number In Python