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.119 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.118 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.117 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.116 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.115 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.114 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.113 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.111 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.110 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.109 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.108 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.107 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.106 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.105 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.104 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.103 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.102 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.101 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.100 tracks/python/exercises/armstrong-numbers/example.py
trackler-2.2.1.99 tracks/python/exercises/armstrong-numbers/example.py