Horje
Python Armstrong Number Code Example
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')
Python Armstrong Number
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')




Python

Related
pandas convert hex string to int Code Example pandas convert hex string to int Code Example
Can Selenium python Web driver helps to extract data from DB Code Example Can Selenium python Web driver helps to extract data from DB Code Example
python how to show package version Code Example python how to show package version Code Example
how to get max value and min values in entire dataframe Code Example how to get max value and min values in entire dataframe Code Example
list lambda functions boto3 Code Example list lambda functions boto3 Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7