human
Number of perfect cubes between two given numbers | Function to count cubes between two numbers.
Traverse through all numbers.
Check if current number ' i ' is perfect cube.
Driver code"
How can the above be solved in Python?
 Give me a code to number of perfect cubes between two given numbers and the other steps required?
assistant
#Here is code to number of perfect cubes between two given numbers and the other steps required.
 def countCubes ( a , b ) :
	for i in range ( a , b + 1 ) :
		for j in range ( i + 1 ) :
			if j * j * j > i :
				break
			if j * j * j == i :
				cnt += 1
	return cnt
if __name__ == ' _ _ main _ _ ' :
	a = 7
	b = 30
	print ( " Count ▁ of ▁ Cubes ▁ is ▁ " , countCubes ( a , b ) )