Frequency Distribution Function In Python With Parameters