“Armstrong -Nummer Python” Code-Antworten

Armstrong -Nummer 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')
Kumaran KM

Python Armstrong -Nummer

number = 153
temp = number
add_sum = 0
while temp!=0:
    k = temp%10
    add_sum +=k*k*k
    temp = temp//10
if add_sum==number:
    print('Armstrong Number')
else:
    print('Not a Armstrong Number')
codelearner

Ähnliche Antworten wie “Armstrong -Nummer Python”

Fragen ähnlich wie “Armstrong -Nummer Python”

Weitere verwandte Antworten zu “Armstrong -Nummer Python” auf Python

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen