SUM OF NON PRIMES - PYTHON

number_of_integers = int(input())

for one in range(1, number_of_integers + 1):
    nonprimes = 0
    total = 0
    given_input = int(input())
    for two in range(1, given_input + 1):
        if given_input % two == 0:
            nonprimes += 1
    if nonprimes > 2:
        total = total + given_input
print(total)

need help with the output!

this should be above the for loop.

1 Like

Thanks a lot brother,

Can you please look into this topic.

thanks for the awesome information.