human
Count factorial numbers in a given range | Function to count factorial.
Find the first factorial number ' fact ' greater than or equal to 'low.
Count factorial numbers in range [ low , high ].
Return the count.
Driver code"
How can the above be solved in Python?
 Write me a code to count factorial numbers in a given range and the other steps required?
assistant
#Here is code to count factorial numbers in a given range and the other steps required.
 def countFact ( low , high ) :
'
	fact = 1
	x = 1
	while ( fact < low ) :
		fact = fact * x
		x += 1
	res = 0
	while ( fact <= high ) :
		res += 1
		fact = fact * x
		x += 1
	return res
print ( " Count ▁ is ▁ " , countFact ( 2 , 720 ) )