For this Question: You are given a number n. Your task is to print the number of prime numbers before that number.The first line of the number of test cases T.
Next T lines contains the value of N.

<b>Constraints</b>
1 <= T <= 100
1 <= N <= 1000Print the number of primes numbers before that number.Sample Input 1:
3
10
19
4

Sample Output 1:
4
8
2, I have written this Solution Code: n = 1000
arr = [True for i in range(n+1)]
i = 2
while i*i <= n:
    if arr[i] == True:
        for j in range(i*2, n+1, i):
            arr[j] = False
    i +=1

arr2 = [0] * (n+1)
for i in range(2,n+1):
    if arr[i]:
        arr2[i] = arr2[i-1] + 1
    else:
        arr2[i] = arr2[i-1]

x = int(input())
for i in range(x):
    y = int(input())
    print(arr2[y]), In this Programming Language: Python, Now tell me if this Code is compilable or not?