mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-12-18 01:00:15 +00:00
Armstrong number definition fix (#4466)
This is a documentation fix. This fix patches a mistake in the description of the Armstrong number. * * Doc fix * Armstrong number is not the sum of cube's of number digits, but the sum of number's digits each raised to the power of the number of digits * Update armstrong_numbers.py Line shorten
This commit is contained in:
parent
650039a279
commit
b3b89d9460
|
@ -1,5 +1,6 @@
|
||||||
"""
|
"""
|
||||||
An Armstrong number is equal to the sum of the cubes of its digits.
|
An Armstrong number is equal to the sum of its own digits each raised
|
||||||
|
to the power of the number of digits.
|
||||||
For example, 370 is an Armstrong number because 3*3*3 + 7*7*7 + 0*0*0 = 370.
|
For example, 370 is an Armstrong number because 3*3*3 + 7*7*7 + 0*0*0 = 370.
|
||||||
An Armstrong number is often called Narcissistic number.
|
An Armstrong number is often called Narcissistic number.
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user