This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An armstrong number is a number that is the sum of its own digits raised to the power of number of digits that make up the original number. | |
import sys | |
def is_armstrong(n): | |
n = int(n) | |
sum_result = 0 | |
# 1. Split the number into it's digits and store them in a list. | |
digits = list(str(n)) |
NewerOlder