Armstrong number program in python using while loop

Armstrong number program in python using while loop. Armstrong may or may not use Python as a programming language. This program is used to determine whether or not a number is an Armstrong number. There are some basic programs that have been defined, and this program is one of them. An Armstrong number is any number with n digits that is equal to the sum of the number’s nth power of digits.

a = int(input("Enter the number "))sum = 0temp = awhile temp > 0:digit = temp % 10sum += digit ** 3temp //= 10if a == sum:print(a,"is an Armstrong ")else:print(a,"is not an Armstrong")