CIBC interview question

write a function of factorial using python