human
Composite Number | A optimized school method based Python program to check if a number is composite ..
Corner cases.
This is checked so that we can skip middle five numbers in below loop.
Driver Program to test above function"
How can the above be solved in Python?
 Give me a code to composite Number and the other steps required?
assistant
#Here is code to composite Number and the other steps required.
 def isComposite ( n ) :
	if ( n <= 1 ) :
		return False
	if ( n <= 3 ) :
		return False
	if ( n % 2 == 0 or n % 3 == 0 ) :
		return True
	i = 5
	while ( i * i <= n ) :
		if ( n % i == 0 or n % ( i + 2 ) == 0 ) :
			return True
		i = i + 6
	return False
print ( " true " ) if ( isComposite ( 11 ) ) else print ( " false " )
print ( " true " ) if ( isComposite ( 15 ) ) else print ( " false " )