In [25]:
#A number is strong if the summation of the factorial of each digits is equal as the number.num = int (input('Enter a number: '))number = numsumm = 0while num > 0:    r = num % 10    fact = 1    for i in range (1, r + 1):        fact = fact * i    summ = summ + fact    num = num//10if summ == number:    print (number, ' is a string number.')else:    print (number, ' is not a string number.')    Enter a number: 34
34 is not a string number.
No comments:
Post a Comment