Sha256: 64c43eb6380bec9cd90e877d2e4749fbf8e7ca63b163e6ce3b13d61d0561f40e

Contents?: true

Size: 103 Bytes

Versions: 105

Compression:

Stored size: 103 Bytes

Contents

def is_armstrong(number):
    return sum(pow(int(d), len(str(number))) for d in str(number)) == number

Version data entries

105 entries across 105 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.97 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.96 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.95 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.94 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.93 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.92 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.91 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.90 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.89 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.88 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.87 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.86 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.85 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.84 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.83 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.82 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.81 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.80 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.79 tracks/python/exercises/armstrong-numbers/example.py