Request that user input an integer and tell them if it is Armstrong number.
()
| 83 | |
| 84 | |
| 85 | def main(): |
| 86 | """ |
| 87 | Request that user input an integer and tell them if it is Armstrong number. |
| 88 | """ |
| 89 | num = int(input("Enter an integer to see if it is an Armstrong number: ").strip()) |
| 90 | print(f"{num} is {'' if armstrong_number(num) else 'not '}an Armstrong number.") |
| 91 | print(f"{num} is {'' if narcissistic_number(num) else 'not '}an Armstrong number.") |
| 92 | print(f"{num} is {'' if pluperfect_number(num) else 'not '}an Armstrong number.") |
| 93 | |
| 94 | |
| 95 | if __name__ == "__main__": |
no test coverage detected