Skip to content

Armstrong number definition fix#4466

Merged
mrmaxguns merged 2 commits into
TheAlgorithms:masterfrom
haningrisha:armstrong_number_fix
May 30, 2021
Merged

Armstrong number definition fix#4466
mrmaxguns merged 2 commits into
TheAlgorithms:masterfrom
haningrisha:armstrong_number_fix

Conversation

@haningrisha
Copy link
Copy Markdown
Contributor

Describe your change:

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

Reference: https://en.wikipedia.org/wiki/Narcissistic_number

  • Add an algorithm?
  • Fix a bug or typo in an existing algorithm?
  • Documentation change?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.

	* 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
@haningrisha haningrisha requested a review from Kush1101 as a code owner May 30, 2021 11:58
@ghost ghost added enhancement This PR modified some existing files awaiting reviews This PR is ready to be reviewed labels May 30, 2021
@mrmaxguns
Copy link
Copy Markdown
Member

mrmaxguns commented May 30, 2021

Thanks for the fix. It should be merged once the pre-commit tests run.

@ghost ghost added the tests are failing Do not merge until tests pass label May 30, 2021
Comment thread maths/armstrong_numbers.py Outdated
@haningrisha haningrisha requested a review from mrmaxguns May 30, 2021 22:11
@ghost ghost removed the tests are failing Do not merge until tests pass label May 30, 2021
Copy link
Copy Markdown
Member

@mrmaxguns mrmaxguns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution 👍

@ghost ghost removed the awaiting reviews This PR is ready to be reviewed label May 30, 2021
@mrmaxguns mrmaxguns merged commit b3b89d9 into TheAlgorithms:master May 30, 2021
Kommandat pushed a commit to Kommandat/Python that referenced this pull request May 31, 2021
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
shermanhui pushed a commit to shermanhui/Python that referenced this pull request Oct 22, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This PR modified some existing files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants