def is_prime(n):
    if n < 2: return False 
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            return False
    return True 

for i in range(30):
    if is_prime(i): print(i)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: