num = int(input("Enter a number: ")) sum = 0 temp = num while temp > 0: digit = temp % 10 sum += digit ** 3 # particular number to the power of 3, (number**n) temp //= 10 #Floor Division, returns only the result(quotient without the floating point) if num == sum: print(num,"is an Armstrong number") else: print(num,"is not an Armstrong number") ''' Output: Enter a number: 535 535 is not an Armstrong number '''
More Codes to Fcuk
- Armstrong Number
- Find the biggest even number
- Program to replace every element on right side
- Compute the frequency of the note
- Print all Possible Combinations from three Digits.
- Get number n and Compute n+nn+nnn
- Print Cube root of the given number
- Convert number into binary, octal and hexa
- Return maximum number of operations performed on array.
- Determine the encryption key
- Find the count of numbers having a prime number in their binary representation.
- Fibonacci Series up to given n numbers
- Help Alice find the route to her home
Explore
- Quantum Mechanics relation with quantum computing
- Unzipping Files using Python
- An Algorithm which accepts n integer values and calculates the average and prints it.
- How can Quantum Computing merge with Virtual Reality ? !
- Blockchain and Cryptocurrency. And their relations with Virtual Reality !!