def semi_prime_count(n):
prime =
scnt = 0
for i in range(1, n + 1):
cnt = 0
for j in range(1, i + 1):
if i % j == 0:
cnt += 1
if cnt == 2:
prime.append(i)
for i in prime:
for j in prime:
if i <= j and i * j < n:
scnt += 1
return print(scnt)
semi_prime_count(34)
The code is working out so far even with other examples, but this is not passing the test cases. I cannot figure out why this code is not being counted as an answer.