Python Program to check Armstrong NumberSuppose we have a given number, "K", and we have to check whether the given number is an Armstrong number or not. In this tutorial, we will learn how to identify the given number is an Armstrong number or not using Python. Definition:A positive number of "p" number of digits is called an Armstrong number of order n (order is the number of digits) if: Example: Example: Output: 1# Please enter the number to be checked: 0 True 2# Please enter the number to be checked: 123 False 3# Please enter the number to be checked: 1634 True ConclusionIn this tutorial, we discussed how to verify whether the given number is an Armstrong number or not. |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India