Answers for "armstrong number check in python"

2

armstrong number python

a = 1634
aa = str(a)
lenn = len(aa)
count = 0
for i in range(lenn):
    count +=  int(aa[i]) ** 4
if count == a :
    print("Yes")
else:
    print('No')
Posted by: Guest on August-30-2021

Code answers related to "armstrong number check in python"

Python Answers by Framework

Browse Popular Code Answers by Language