Oops, try again. factorial(2) returned None, did you remember to return the result?
I always get this Error message although print total always shows the right answer. Could someone tell me why and how to fix it?
def factorial(x): if x == 0: return 1 elif x == 1: return 1 else: i = 1 total = 1 while i < x+1: total *= i i += 1 print total print factorial(5)