Factorial


#1

def factorial(x):
i = 0
summ = 1
if(i<x):
summ=summ*(x-i)
i = i + 1
return summ

who can tell me why it's incorrect,and I switch "if" to "while",it's normal


#2

it's solved,I read it's wrong


#3