I am writing this code to get the 10! ,however, I believe I have an infinite loop in there since it keeps repeating the same error code. I am trying to find the issue but can not seem to.
def calculatingfactor(num2cal): """this fuction will be calculating a mathematical factorial""" if num2cal == 1: returnvalue = 1 elif num2cal <= 0: returnvalue = 0 else: print("Calculating the facterial of {}".format(num2cal)) variable2 = calculatingfactor(num2cal - 1) returnvalue = calculatingfactor(num2cal*variable2) return #main code first_fact=calculatingfactor(10) print (first_fact)