Print series of prime numbers in python
You need to check all numbers from 2 to n-1 (to sqrt(n) actually, but ok, let it be n). If n is divisible by any of the numbers, it is not prime. If a number is prime, print it. You can write the same much shorter and more pythonic: As I’ve said already, it would … Read more