input: 
  def is_armstrong_number(num):  
      n = len(str(num))  
      # initialize sum  
      sum_of_digits = 0  
    
      # find sum of nth power of individual digits  
      temp = num  
      while temp > 0:  
          digit = temp % 10  
          sum_of_digits += digit ** n  
          temp //= 10  
    
      # if num is equal to sum_of_digits then the number is an Armstrong number  
      return num == sum_of_digits
  
  # Example usage:
  # >>> is_armstrong_number(153)
  # True
  # >>> is_armstrong_number(9474)
  # True
  # >>> is_armstrong_number(1000)
  # False
  
output:     if num == sum_of_digits:
          return True
      else:
          return False