Skip to content
← Back to Community
How to write a program for Armstrong numbers in Python ?
Profile icon
mrharraq

How ca I write a program for finding armstrong number? for example:
-Asking a user to enter number (eg. 153)

  • Asking Enter n value (eg. 3)
  • Function to calculate 1^3 , 5^3 , 3^3
  • print answer
Voters
Profile icon
mrharraq
Comments
hotnewtop
Profile icon
[deleted]

Link to Wikipedia article. Look towards the end of the page: https://en.wikipedia.org/wiki/Narcissistic_number