M = 3
N = 16
answer = []

for num in range(M, N):
    if num < 2:
        continue
    is_prime = True
    for i in range(2, int(num ** 0.5) + 1):
        if num % i == 0:
            is_prime = False
            break
    if is_prime == True:
        answer.append(num)

print(answer)

Embed on website

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