GH avatar Bite 279. Armstrong numbers

In number theory there are many interesting numbers - eg. Armstrong numbers, Happy numbers, Meertens numbers, just name a few.

In this bite, you will try to solve the Armstrong number question: given an integer, determine if it is an armstrong number.

An armstrong number is a number that is the sum of its own digits each raised to the power of the number of digits. See this reference for more info and here are some examples:

a) 153 is an armstrong number. It's a 3 digits number:

    (1^3) + (5^3) + (3^3)= 153.

b) 371 is also an armstrong number.

c) any single digit numbers (1-9) are armstrong numbers as well.

Login and get coding
go back Beginner level
Bitecoin 2X

60 out of 61 users completed this Bite.
Will you be Pythonista #61 to crack this Bite?
Resolution time: ~24 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 1.0 on a 1-10 difficulty scale.
» You can do it! 😌

We use Python 3.8