filmov
tv
Write a python program to find Armstrong number in a given interval.
Показать описание
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371. The input function allows user input. A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string). This is less like the for keyword in other programming languages, and works more like an iterator method as found in other object-orientated programming languages. Python while loop is used to run a block code until a certain condition is met. The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and stops before a specified number.
Thank you for watching my video, you can ask me if you have any doubt regarding this topic.
Thank you for watching my video, you can ask me if you have any doubt regarding this topic.