input: Write a function to check if a given number is an Armstrong number. If the number is an Armstrong number, return True; otherwise, return False. If the number is negative, return False. An Armstrong number (also known as a Narcissistic number) is a number that is the sum of its own digits each raised to the power of the number of digits.
  
  def is_armstrong_number(num):
      if num < 0:
          return False
      n = len(str(num))
      temp = num
      sum_of_digits = 0
      while temp > 0:
          digit = temp % 10
          sum_of_digits += digit ** n
          temp //= 10
      return num == sum_of_digits
  
  assert is_armstrong_number(153) == True
  assert is_armstrong_number(370) == True
  assert is_armstrong_number(9474) == True
  assert is_armstrong_number(120) == False
  assert is_armstrong_number(-153) == False
  assert is_armstrong_number(0) == True
output: def is_armstrong_number(num):
      if num < 0:
          return False
      n = len(str(num))
      temp = num
      sum_of_digits = 0
      while temp > 0:
          digit = temp % 10
          sum_of_digits += digit ** n
          temp //= 10
      return num == sum_of_digits