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.180 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.179 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.178 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.177 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.176 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.175 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.174 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.173 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.172 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.171 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.170 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.169 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.167 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.166 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.165 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.164 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.163 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.162 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.161 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.160 tracks/python/exercises/armstrong-numbers/example.py