+ 10

Python program to check whether a given no is Armstrong or not

28th Oct 2018, 2:14 PM
Keerthy Sivadas
Keerthy Sivadas - avatar
3 Answers
+ 4
There you go, just made it, an armstrong number checker: https://code.sololearn.com/chOE80MWgV6i/?ref=app
28th Oct 2018, 5:54 PM
Paul
Paul - avatar
+ 1
n=input("enter a number") Sum=0 For i in n : Sum+=int(i) **3 If sum==int(n) : Print("it is armstrong number") Else : Print("not armstrong")
24th Apr 2020, 6:56 PM
Swatantra Kumar
0
Is this a question?
28th Oct 2018, 3:43 PM
Ulisses Cruz
Ulisses Cruz - avatar