Computer Science, asked by carinmaritz1930, 5 months ago

3. To write a Python program for displaying a special number from 146 to 100000 where the special number is like 145 ( 145 = 1! + 4! + 5! ).

Answers

Answered by RuwaisnZaid
0

Explanation:

x = int(input("enters a no")) = 100000

sum = 0

m = x

while x>146:

p = x%10

sum = sum*10+p!

x = int(x/10)

if m==sum:

print(sum)

else:

print("not special no)

Similar questions