factorial(n) int:a.this function takes one argument n as a string and returns n! (the factorial of n), if n is not a non-negativeint, return none (hint: the string method isdigit() may be useful). your factorial calculation must be based on the following formula (you are allowed to calculate the values in reverse order, but you are not allowed to simply call math.factorial(n) or similar): note: by definition 0!