```
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!

chanduy45:

`total = 0`

this should be above the for loop.

1 Like

Thanks a lot brother,

Can you please look into this topic.

Need solution for python code!
How can we find the armstrong numbers in given interval.
I have written the code successfuly to identify the number, but could not be able to get the desired output.
lower = int(input())
upper = int(input())
for num in range(lower,upper + 1):
sum = 0
temp = num
armstrong = ""
while temp > 0:
digit = temp % 10
sum += digit ** 3
temp //= 10
if num == sum:
armstrong = armstrong + (str(numâ€¦

Need solution for python code! How can we find the armstrong numbers in given interval. I have written the code successfuly to identify the number, but could not be able to get the desired output. lower = int(input()) upper = int(input()) for num in range(lower,upper + 1): sum = 0 temp = num armstrong = â€śâ€ť while temp > 0: digit = temp % 10 sum += digit ** 3 temp //= 10 if num == sum: armstrong = armstrong + (str(numâ€¦

thanks for the awesome information.