Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Narcissistic number python

def narcissistic( value ):
    value = str(value)
    size = len(value)
    sum = 0
    for i in value:
        sum += int(i) ** size
    return sum == int(value)
 
PREVIOUS NEXT
Tagged: #Narcissistic #number #python
ADD COMMENT
Topic
Name
7+8 =