def is_prime(n): if n < 2: return False i = 2 while i * i <= n: if n % i == 0: return False i += 1 return True for i in range(30): if is_prime(i): print(i)
To embed this project on your website, copy the following code and paste it into your website's HTML: