Loading...
The Self-Portrait Number
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- junior, mid
Problem
A data validation service needs to flag numbers with a special self-referential property for auditing. Write a function that takes a positive integer and returns True if it is an Armstrong number - one where the sum of each digit raised to the power of the total number of digits equals the original number.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a sandboxed Docker environment and grades it instantly.