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.159 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.158 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.157 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.156 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.155 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.154 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.153 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.152 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.151 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.150 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.149 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.148 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.147 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.146 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.145 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.144 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.143 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.142 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.141 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.140 tracks/python/exercises/armstrong-numbers/example.py