Computer Science, asked by ranuagarwalm, 7 months ago

wap to input a number, count the number of odd factors and print it​

Answers

Answered by suraj7845
1

Answer:

Only those numbers, which are perfect Squares have an odd number of factors. ... 16 also has odd number of factors, 1, 2, 4, 8, 16. The reason for this is, for numbers other than perfect squares, all factors are in the form of pairs, but for perfect squares, one factor is single and makes the total as odd.

Explanation:

Answered by DarkShadow040
0
num=list(input("enter number: "))
count = 0
for i in num:
if eval(i) % 2 != 0:
count+=1
print(count)
Similar questions