News

Find the sum of the Digits of a Number in Python Given an input the objective to find the Sum of Digits of a Number in Python. To do so we’ll first extract the last element of the number and then keep ...
Python Program for Find sum of odd factors of a number num = int (input ('enter the no. = ')) l = [] for i in range (1,num+1): if num % i == 0: if i % 2 != 0: l.append (i) print ('sum of odd factor is ...