
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
How to Find Armstrong Number in an Interval using Python?
If sum of cubes of individual digits in a number add up to the number itself, it is called armstrong number. for example 153=1**3+5**3+3**3
Example
Following Python program find armstrong numbers between 100 to 1000
for num in range(100,1000): temp=num sum=0 while temp>0: digit=temp%10 sum=sum+digit**3 temp=temp//10 if sum==num: print (num)
Output
The output is as follows −
153 370 371 407
- Related Articles
- Armstrong Number in Python
- How to Print all Prime Numbers in an Interval using Python?
- Python Program to Check Armstrong Number
- Program to find one minimum possible interval to insert into an interval list in Python
- Program to count odd numbers in an interval range using Python
- How to generate armstrong numbers in Python?
- Armstrong number in Java.
- Java program to check whether the given number is an Armstrong number
- Python Program to Print Numbers in an Interval
- How to Find Factors of Number using Python?
- How to Check Armstrong Number between Two Integers in Golang?
- How to Find Factorial of Number Using Recursion in Python?
- How to print Narcissistic(Armstrong) Numbers with Python?
- How to find the number of digits in a given number using Python?
- Check the number is Armstrong or not using C

Advertisements