write a python program for find sum of odd factors of a number

preview_player
Показать описание
Code - pls like share and subscribe to channel
=================================================
n = int(input("Enter Number : "))

total = 0
for index in range(1, n+1):
if n % index == 0 and index % 2 == 1:
total += index

print(f"sum of odd factors of a {n} is : {total}")
Рекомендации по теме
join shbcf.ru