please program it fast
Attachments:
Answers
Answered by
0
Answer:
oh its easy you just got to do this
number = 407
temp = number
add_sum = 0
while temp!=0:
k = temp%10
add_sum +=k*k*k
temp = temp//10
if add_sum==number:
print('Armstrong Number')
else:
print('Not a Armstrong Number')
num = int(input("Enter a number to find factorial : "))
factorial = 1
if num < 0:
print("Cant find the factorial of negative numbers")
elif num == 0:
print("The factorial of 0 is 1")
else:
for i in range(num,0,-1):
factorial=factorial*i
print("The factorial of ", num, "is", factorial)
Explanation:
Similar questions