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!

1 Like

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.

Thank you sir

yes then only the code worked out… but how to know sir exactly where do we need to place it above the loop or inside the loop…
because count also i kept above the loop but result went wrong…
those two one in inside another outside of the loop
ho do we can determine them