Can someone explain what's wrong with my code? It seems to me like it would return the correct answer. I'm guessing it's the formatting and wrong order of commands.
Oops, try again. factorial(2) returned 1 instead of 2
def factorial(x): total =  answer = 1 def listing(x): while int(x) > 0: total.append(x) x -= 1 return total def multiplying(x): for n in total: answer *= n return answer return answer