Program to calculate factorial of given number in python