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
- L3
Problem
Given a positive integer n with d digits, return True if the sum of each digit raised to the power d equals n. (Armstrong / narcissistic number check.)
Summary
Some numbers describe themselves perfectly.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.