<prompt> Create a function to to check if a given number is an Armstrong number or not.  <response>: An Armstrong number is a number that is equal to the sum of its own digits each raised to the power of the number of digits. For example, the number 371 is an Armstrong number because 33 73 13 371.Heres a function in python which checks if the given number is an Armstrong number:pythondef is_armstrong_numbernumber: Get the number of digits in the number digits lenstrnumber Compute the sum of the digits raised to the power of the number of digits total_sum sumintdigit digits for digit in strnumber return True if the number is equal to the sum of the digits raised to the power of the number of digits return number total_sumYou can use the function by calling it with the number you want to check as an argument, like this:pythonprintis_armstrong_number371 Trueprintis_armstrong_number9474 Trueprintis_armstrong_number12 FalseThis function first calculates the number of digits in the given number, and then calculates the sum of each digit raised to the power of the number of digits. Finally, it checks if the calculated sum is equal to the original number and returns True if it is, otherwise returns False. 