The Open Diaries
Public Diaries
Login
Chubukov's Dear Diary
Index
Direction
Front
Back
December 23, 2020
#To check of entered number is an Armstrong number num = input('enter a number : ') l = len(num) num1 = int(num) num2 = num1 result = 0 while num1 > 0 : digit = num1%10 result = (digit**l) + result num1 = num1//10 if num2 == result
Dec 23