Factorial program in python using class