N = 10 count = 0 for i in range(2, N): is_prime = True for j in range(2, int(i ** 0.5) + 1): if i % j == 0: is_prime = False break if is_prime: count += 1 print(count)
To embed this project on your website, copy the following code and paste it into your website's HTML: