CIBC Interview Question

write a function of factorial using python