{"id":18317,"date":"2021-08-26T10:42:06","date_gmt":"2021-08-26T05:12:06","guid":{"rendered":"https:\/\/python-programs.com\/?p=18317"},"modified":"2021-11-22T18:37:15","modified_gmt":"2021-11-22T13:07:15","slug":"python-program-to-find-sum-of-odd-factors-of-a-number","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-program-to-find-sum-of-odd-factors-of-a-number\/","title":{"rendered":"Python Program to Find Sum of Odd Factors of a Number"},"content":{"rendered":"

In the previous article, we have discussed Python Program to Find sum of Even Factors of a Number<\/a>
\nGiven a number, and the task is to get the sum of odd factors of a given number.<\/p>\n

Factors are numbers or algebraic expressions that divide another number by themselves and leave no remainder.<\/p>\n

Example: let the given number = 24<\/p>\n

# The factors of 24 are : 1, 2, 3, 4, 6, 8, 12, 24<\/p>\n

The sum of odd factors of 24 = 1+3= 4<\/p>\n

Examples:<\/strong><\/p>\n

Example1:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 24<\/pre>\n

Output:<\/strong><\/p>\n

The Sum of all odd factors of { 24 }  =  4<\/pre>\n

Example2:<\/strong><\/p>\n

Input:<\/strong><\/p>\n

Given Number = 72<\/pre>\n

Output:<\/strong><\/p>\n

The Sum of all odd factors of { 72 }  =  13<\/pre>\n

Program to Find the Sum of Odd Factors of a Number in Python<\/h2>\n

Below are the ways to the sum of odd factors of a given number.<\/p>\n